add the rest of the tests
They won't pass for some reasons, unfortunately.
This commit is contained in:
parent
07ff2168b8
commit
e15e0bbe84
2 changed files with 16 additions and 4 deletions
|
|
@ -10,7 +10,7 @@ module Spec.Governor (tests) where
|
||||||
import Agora.Governor (GovernorDatum (..), GovernorRedeemer (..))
|
import Agora.Governor (GovernorDatum (..), GovernorRedeemer (..))
|
||||||
import Agora.Governor.Scripts (governorPolicy, governorValidator)
|
import Agora.Governor.Scripts (governorPolicy, governorValidator)
|
||||||
import Agora.Proposal (ProposalId (..))
|
import Agora.Proposal (ProposalId (..))
|
||||||
import Spec.Sample.Governor (createProposal, mintGST)
|
import Spec.Sample.Governor (createProposal, mintGATs, mintGST, mutateState)
|
||||||
import Spec.Sample.Shared qualified as Shared
|
import Spec.Sample.Shared qualified as Shared
|
||||||
import Spec.Util (policySucceedsWith, validatorSucceedsWith)
|
import Spec.Util (policySucceedsWith, validatorSucceedsWith)
|
||||||
import Test.Tasty (TestTree, testGroup)
|
import Test.Tasty (TestTree, testGroup)
|
||||||
|
|
@ -35,5 +35,17 @@ tests =
|
||||||
(GovernorDatum Shared.defaultProposalThresholds (ProposalId 0))
|
(GovernorDatum Shared.defaultProposalThresholds (ProposalId 0))
|
||||||
CreateProposal
|
CreateProposal
|
||||||
createProposal
|
createProposal
|
||||||
|
, validatorSucceedsWith
|
||||||
|
"GATs minting"
|
||||||
|
(governorValidator Shared.governor)
|
||||||
|
(GovernorDatum Shared.defaultProposalThresholds (ProposalId 5))
|
||||||
|
MintGATs
|
||||||
|
mintGATs
|
||||||
|
, validatorSucceedsWith
|
||||||
|
"mutate governor state"
|
||||||
|
(governorValidator Shared.governor)
|
||||||
|
(GovernorDatum Shared.defaultProposalThresholds (ProposalId 5))
|
||||||
|
MutateGovernor
|
||||||
|
mutateState
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ This module tests primarily the happy path for Governor interactions
|
||||||
module Spec.Sample.Governor (
|
module Spec.Sample.Governor (
|
||||||
createProposal,
|
createProposal,
|
||||||
mutateState,
|
mutateState,
|
||||||
mintGAT,
|
mintGATs,
|
||||||
mintGST,
|
mintGST,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
|
|
@ -268,8 +268,8 @@ createProposal =
|
||||||
}
|
}
|
||||||
|
|
||||||
-- | This script context should be a valid transaction.
|
-- | This script context should be a valid transaction.
|
||||||
mintGAT :: ScriptContext
|
mintGATs :: ScriptContext
|
||||||
mintGAT =
|
mintGATs =
|
||||||
let pst = Value.singleton proposalPolicySymbol "" 1
|
let pst = Value.singleton proposalPolicySymbol "" 1
|
||||||
gst = Value.assetClassValue govAssetClass 1
|
gst = Value.assetClassValue govAssetClass 1
|
||||||
gat = Value.assetClassValue atAssetClass 1
|
gat = Value.assetClassValue atAssetClass 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue