chore(test): add test for ExamRoomRandom
This commit is contained in:
parent
b6df520fab
commit
dbd7726bbb
@ -1,5 +1,4 @@
|
||||
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
|
||||
{-# OPTIONS_GHC -Wwarn #-}
|
||||
|
||||
module Handler.Utils.ExamSpec (spec) where
|
||||
|
||||
@ -103,7 +102,7 @@ spec = do
|
||||
describe "examAutoOccurrence" $ do
|
||||
describe "Surname" $ testWithRule ExamRoomSurname
|
||||
describe "Matriculation" $ testWithRule ExamRoomMatriculation
|
||||
-- TODO test with ExamRoomManual, ExamRoomFifo, (ExamRoomSurname), (ExamRoomMatriculation), ExamRoomRandom
|
||||
describe "Random" $ testWithRule ExamRoomRandom
|
||||
where
|
||||
testWithRule :: ExamOccurrenceRule -> Spec
|
||||
testWithRule rule =
|
||||
@ -150,6 +149,7 @@ spec = do
|
||||
-- is a nullResult justified?
|
||||
Nothing -> pure ()
|
||||
{-
|
||||
-- disabled for now, probably not correct with the current implementation
|
||||
myAnnotate "unjustified nullResult"
|
||||
$ shouldSatisfy (rule, userProperties, occurrences) $ uncurry3 isNullResultJustified
|
||||
-}
|
||||
@ -252,7 +252,7 @@ spec = do
|
||||
transformTag (length -> rangeLength) = case rule of
|
||||
ExamRoomMatriculation -> reverse . take rangeLength . reverse
|
||||
_rule -> take rangeLength
|
||||
_otherwise -> False
|
||||
_otherwise -> (rule /= ExamRoomSurname) && (rule /= ExamRoomMatriculation)
|
||||
{-
|
||||
-- | Is mapping impossible?
|
||||
isNullResultJustified :: ExamOccurrenceRule
|
||||
|
||||
Loading…
Reference in New Issue
Block a user