diff --git a/test/Handler/Utils/ExamSpec.hs b/test/Handler/Utils/ExamSpec.hs index a9b6c1e82..8f7fc1e02 100644 --- a/test/Handler/Utils/ExamSpec.hs +++ b/test/Handler/Utils/ExamSpec.hs @@ -40,7 +40,7 @@ import Handler.Utils.Exam -- expected: False -- but got: True -- @ -myAnnotate :: (HasCallStack) => String -> Expectation -> Expectation +myAnnotate :: HasCallStack => String -> Expectation -> Expectation myAnnotate msg = handle $ \(HUnitFailure loc exn) -> throwIO $ HUnitFailure loc $ case exn of Reason str -> @@ -145,7 +145,7 @@ spec = do = (rule == ExamRoomMatriculation) -- every user with a userMatrikelnummer got a room -- fail on unknown user - || (fromMaybe False $ isNothing . userMatrikelnummer . fst <$> Map.lookup userId users) + || maybe False (isNothing . userMatrikelnummer . fst) (Map.lookup userId users) myAnnotate "user didn't get a room" $ shouldSatisfy userMap $ foldr foldFn True . Map.toList -- all users match the shown ranges myAnnotate "shown ranges don't match userMap"