File tree 1 file changed +11
-6
lines changed
1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ import Test.Plutip.Contract (
42
42
)
43
43
import Test.Plutip.Internal.Types (
44
44
ClusterEnv ,
45
- FailureReason (CaughtException ),
45
+ FailureReason (CaughtException , ContractExecutionError ),
46
46
isException ,
47
47
)
48
48
import Test.Plutip.LocalCluster (BpiWallet , withConfiguredCluster )
@@ -187,11 +187,16 @@ test =
187
187
, overallBudgetFits 1156006922 2860068
188
188
]
189
189
, -- regression tests for time <-> slot conversions
190
- assertExecution
191
- " Fails because outside validity interval"
192
- (initAda [100 ])
193
- (withContract $ const failingTimeContract)
194
- [shouldFail]
190
+ let isValidityError = \ case
191
+ ContractExecutionError e -> " OutsideValidityIntervalUTxO" `isInfixOf` e
192
+ _ -> False
193
+ in assertExecution
194
+ " Fails because outside validity interval"
195
+ (initAda [100 ])
196
+ (withContract $ const failingTimeContract)
197
+ [ shouldFail
198
+ , failReasonSatisfies " Execution error is OutsideValidityIntervalUTxO" isValidityError
199
+ ]
195
200
, assertExecution
196
201
" Passes validation with exact time range checks"
197
202
(initAda [100 ])
You can’t perform that action at this time.
0 commit comments