Skip to content

Commit c99a1d5

Browse files
rashadg1030vrom911
authored andcommitted
[Holmusk#70] Fix failsWith function (Holmusk#71)
Resolves Holmusk#70
1 parent 02870e4 commit c99a1d5

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

test/Test/Assert.hs

+1-5
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,7 @@ satisfies app p env = runAppAsIO env app >>= \case
4949
-- | Checks whether action fails and returns given error.
5050
failsWith :: (Show a) => App a -> AppErrorType -> AppEnv -> Expectation
5151
failsWith app err env = runAppAsIO env app >>= \case
52-
Left e@AppError{..} ->
53-
if appErrorType == err
54-
then appErrorType `shouldBe` err
55-
else expectationFailure $
56-
"Expected 'Failure' with: " <> show err <> " but got: " <> show e
52+
Left AppError{..} -> appErrorType `shouldBe` err
5753
Right a -> expectationFailure $
5854
"Expected 'Failure' with: " <> show err <> " but got: " <> show a
5955

0 commit comments

Comments
 (0)