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 @@ -43,7 +43,7 @@ import Test.Plutip.Contract (
4343 )
4444import Test.Plutip.Internal.Types (
4545 ClusterEnv ,
46- FailureReason (CaughtException ),
46+ FailureReason (CaughtException , ContractExecutionError ),
4747 isException ,
4848 )
4949import Test.Plutip.LocalCluster (BpiWallet , withConfiguredCluster )
@@ -188,11 +188,16 @@ test =
188188 , overallBudgetFits 1106851699 2694968
189189 ]
190190 , -- regression tests for time <-> slot conversions
191- assertExecution
192- " Fails because outside validity interval"
193- (initAda [100 ])
194- (withContract $ const failingTimeContract)
195- [shouldFail]
191+ let isValidityError = \ case
192+ ContractExecutionError e -> " OutsideValidityIntervalUTxO" `isInfixOf` e
193+ _ -> False
194+ in assertExecution
195+ " Fails because outside validity interval"
196+ (initAda [100 ])
197+ (withContract $ const failingTimeContract)
198+ [ shouldFail
199+ , failReasonSatisfies " Execution error is OutsideValidityIntervalUTxO" isValidityError
200+ ]
196201 , assertExecution
197202 " Passes validation with exact time range checks"
198203 (initAda [100 ])
You can’t perform that action at this time.
0 commit comments