Skip to content

Commit

Permalink
Auction spec fixes and better test
Browse files Browse the repository at this point in the history
  • Loading branch information
uhbif19 committed May 28, 2024
1 parent 311fd05 commit 872d490
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Cardano/CEM/Examples/Auction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ instance CEMScript SimpleAuction where
(SumValueEq $ lot params)
, nextState NotStarted
]
, signers = [seller params]
, signers = []
}
(Just NotStarted, Start) ->
Right
Expand Down
12 changes: 12 additions & 0 deletions test/Auction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,18 @@ auctionSpec = describe "Auction" $ do
Just (CurrentBid currentBid) <- queryScriptState auctionParams
liftIO $ currentBid `shouldBe` bid1

submitAndCheck $
MkTxSpec
{ actions =
[ MkSomeCEMAction $
MkCEMAction
auctionParams
( MakeBid $ MkBet (signingKeyToPKH bidder1) 4_000_000
)
]
, specSigner = bidder1
}

submitAndCheck $
MkTxSpec
{ actions =
Expand Down

0 comments on commit 872d490

Please sign in to comment.