File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 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 (
4242 )
4343import Test.Plutip.Internal.Types (
4444 ClusterEnv ,
45- FailureReason (CaughtException ),
45+ FailureReason (CaughtException , ContractExecutionError ),
4646 isException ,
4747 )
4848import Test.Plutip.LocalCluster (BpiWallet , withConfiguredCluster )
@@ -187,11 +187,16 @@ test =
187187 , overallBudgetFits 1156006922 2860068
188188 ]
189189 , -- 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+ ]
195200 , assertExecution
196201 " Passes validation with exact time range checks"
197202 (initAda [100 ])
You can’t perform that action at this time.
0 commit comments