fix: tests & hlint
This commit is contained in:
parent
b3ce3dd93a
commit
4e9b618b61
@ -191,7 +191,7 @@ makeExternalExamUsersTable mode (Entity eeId ExternalExam{..}) = do
|
|||||||
|
|
||||||
E.where_ $ result E.^. ExternalExamResultExam E.==. E.val eeId
|
E.where_ $ result E.^. ExternalExamResultExam E.==. E.val eeId
|
||||||
|
|
||||||
unless (isLecturer || mode == EEUMUsers) $ do
|
unless (isLecturer || mode == EEUMUsers) $
|
||||||
E.where_ $ ExternalExam.examOfficeExternalExamResultAuth (E.val uid) result
|
E.where_ $ ExternalExam.examOfficeExternalExamResultAuth (E.val uid) result
|
||||||
|
|
||||||
return (result, user, isSynced)
|
return (result, user, isSynced)
|
||||||
|
|||||||
@ -50,7 +50,7 @@ guessUser (Set.toList -> criteria) = $cachedHereBinary criteria $ go False
|
|||||||
E.where_ . E.and $ map (toSql user) criteria
|
E.where_ . E.and $ map (toSql user) criteria
|
||||||
return user
|
return user
|
||||||
users <- retrieveUsers
|
users <- retrieveUsers
|
||||||
let users' = reverse $ sortBy closeness users
|
let users' = sortBy (flip closeness) users
|
||||||
|
|
||||||
matchesMatriculation :: Entity User -> Maybe Bool
|
matchesMatriculation :: Entity User -> Maybe Bool
|
||||||
matchesMatriculation = preview $ _entityVal . _userMatrikelnummer . to (\userMatr -> all ((== userMatr) . Just) $ criteria ^.. folded . _guessUserMatrikelnummer)
|
matchesMatriculation = preview $ _entityVal . _userMatrikelnummer . to (\userMatr -> all ((== userMatr) . Just) $ criteria ^.. folded . _guessUserMatrikelnummer)
|
||||||
|
|||||||
@ -70,6 +70,10 @@ instance Arbitrary ExamOfficeR where
|
|||||||
arbitrary = genericArbitrary
|
arbitrary = genericArbitrary
|
||||||
shrink = genericShrink
|
shrink = genericShrink
|
||||||
|
|
||||||
|
instance Arbitrary EExamR where
|
||||||
|
arbitrary = genericArbitrary
|
||||||
|
shrink = genericShrink
|
||||||
|
|
||||||
instance Arbitrary CourseNewsR where
|
instance Arbitrary CourseNewsR where
|
||||||
arbitrary = genericArbitrary
|
arbitrary = genericArbitrary
|
||||||
shrink = genericShrink
|
shrink = genericShrink
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user