Skip to content

Commit d924f24

Browse files
committed
Address last TODOs
1 parent eca6268 commit d924f24

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

hydra-tx/test/Hydra/Tx/Contract/Deposit.hs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import Hydra.Tx.Deposit (depositTx)
1515
import Test.Hydra.Tx.Fixture (slotLength, systemStart, testNetworkId, testPolicyId)
1616
import Test.Hydra.Tx.Gen (genUTxOSized)
1717
import Test.Hydra.Tx.Mutation (Mutation (..), SomeMutation (..))
18-
import Test.QuickCheck (chooseInteger, elements)
18+
import Test.QuickCheck (chooseEnum, chooseInteger, elements)
1919

2020
genHealthyDepositTx :: Gen (Tx, UTxO)
2121
genHealthyDepositTx = do
@@ -28,12 +28,17 @@ genHealthyDepositTx = do
2828
testNetworkId
2929
(mkHeadId testPolicyId)
3030
(mkSimpleBlueprintTx toDeposit)
31-
(SlotNo 1) -- TODO: generate?
32-
healthyDeadline -- TODO: generate?
31+
slot
32+
healthyDeadline
3333
pure (tx, toDeposit)
34+
where
35+
slot = chooseEnum (0, healthyDeadlineSlot) `generateWith` 42
3436

3537
healthyDeadline :: UTCTime
36-
healthyDeadline = slotNoToUTCTime systemStart slotLength $ SlotNo 10
38+
healthyDeadline = slotNoToUTCTime systemStart slotLength healthyDeadlineSlot
39+
40+
healthyDeadlineSlot :: SlotNo
41+
healthyDeadlineSlot = arbitrary `generateWith` 42
3742

3843
data DepositMutation
3944
= -- | Change the output value to a subset of the deposited value. This

0 commit comments

Comments
 (0)