add a simple test

This commit is contained in:
fanghr 2022-05-07 18:49:37 +08:00
parent 023fcc8e6f
commit 30b66a29ff
No known key found for this signature in database
GPG key ID: 35CD9A71CD5D5870

View file

@ -1,6 +1,30 @@
module Spec.Effect.GovernorMutation (tests) where
import Test.Tasty (TestTree)
import Agora.Effect.GovernorMutation (MutateGovernorDatum (..), mutateGovernorValidator)
import Agora.Governor (GovernorDatum (..))
import Agora.Proposal (ProposalId (..))
import Plutus.V1.Ledger.Api (TxOutRef (..))
import Spec.Sample.Effect.GovernorMutation
import Spec.Sample.Shared
import Spec.Util (effectSucceedsWith)
import Test.Tasty (TestTree, testGroup)
tests :: [TestTree]
tests = []
tests =
[ testGroup
"validator"
[ effectSucceedsWith
"Simple"
(mutateGovernorValidator governor)
( MutateGovernorDatum
{ governorRef = TxOutRef "614481d2159bfb72350222d61fce17e548e0fc00e5a1f841ff1837c431346ce7" 1
, newDatum =
GovernorDatum
{ nextProposalId = ProposalId 42
, proposalThresholds = defaultProposalThresholds
}
}
)
validContext
]
]