Skip to content

Commit

Permalink
2 first test groups passé
Browse files Browse the repository at this point in the history
  • Loading branch information
mmontin committed Jul 11, 2024
1 parent ad513f2 commit d84ad6a
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions tests/Cooked/BalancingSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ noBalanceMaxFee = do
txSkelOpts =
def
{ txOptBalancingPolicy = DoNotBalance,
txOptFeePolicy = AutoFeeComputation,
txOptCollateralUtxos = CollateralUtxosFromSet (Set.singleton txOutRef) alice
txOptFeePolicy = AutoFeeComputation
},
txSkelSigners = [alice]
}
Expand Down Expand Up @@ -294,8 +293,20 @@ tests =
(setCollateralWallet alice . setDontBalance . setFixedFee 1_000_000)
),
testBalancingFailsWith
"A collateral wallet needs to be provided when auto balancing is enabled"
"A collateral wallet needs to be provided when auto balancing is enabled and script are involved..."
failsLackOfCollateralWallet
( testingBalancingTemplate
(ada 49)
mempty
(aliceNAdaUtxos 8)
emptySearch
emptySearch
True
(setDontBalance . setFixedFee 1_000_000)
),
testBalancingSucceedsWith
"... but is not necessary otherwise."
[hasFee 1_000_000, insNb 1, additionalOutsNb 0, colInsNb 0, retOutsNb 3]
( testingBalancingTemplate
(ada 7)
mempty
Expand All @@ -306,8 +317,20 @@ tests =
(setDontBalance . setFixedFee 1_000_000)
),
testBalancingSucceedsWith
"We can also directly give a set of collateral utxos"
[hasFee 1_000_000, insNb 1, additionalOutsNb 0, colInsNb 1, retOutsNb 3]
"We can also directly give a set of collateral utxos..."
[hasFee 1_000_000, insNb 2, additionalOutsNb 0, colInsNb 1, retOutsNb 3]
( testingBalancingTemplate
(ada 49)
mempty
(aliceNAdaUtxos 8)
emptySearch
(aliceNAdaUtxos 8)
True
(setDontBalance . setFixedFee 1_000_000)
),
testBalancingSucceedsWith
"... which will be ignored when no script is involved."
[hasFee 1_000_000, insNb 1, additionalOutsNb 0, colInsNb 0, retOutsNb 3]
( testingBalancingTemplate
(ada 7)
mempty
Expand Down

0 comments on commit d84ad6a

Please sign in to comment.