chore(test): hlint told me to use maybe here
This commit is contained in:
parent
c99d96ecb8
commit
7f1df44fc3
@ -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"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user