chore: fix tests

This commit is contained in:
Gregor Kleen 2020-03-13 19:05:04 +01:00
parent 996005935d
commit 648d733f3f
3 changed files with 3 additions and 2 deletions

View File

@ -8,5 +8,6 @@ log-settings:
destination: "test.log"
auth-dummy-login: true
server-session-acid-fallback: true
job-workers: 1

View File

@ -102,7 +102,7 @@ allocationAcceptForm aId = runMaybeT $ do
let validateMatches =
guardValidation MsgAllocationAcceptFormDoesNotMatchSession =<< State.get
return . (set (mapped . mapped . _1 . mapped) allocRes) . validateForm validateMatches . identifyForm FIDAllocationAccept $ \csrf -> do
return . set (mapped . mapped . _1 . mapped) allocRes . validateForm validateMatches . identifyForm FIDAllocationAccept $ \csrf -> do
(prevAllocRes, prevAllocView) <- mreq hiddenField "" $ Just allocFp
let prevAllocMatches = (== allocFp) <$> prevAllocRes

View File

@ -88,7 +88,7 @@ postParticipantsIntersectR = do
courseQuery = E.from return
termSchoolAccess (Entity _ Course{..}) =
hasReadAccessTo $ ParticipantsR courseTerm courseSchool
((coursesRes, coursesView), coursesEnc) <- runFormPost . renderAForm FormStandard $ courseSelectForm courseQuery termSchoolAccess (\_ -> Nothing) ("participants-intersect" :: Text) (fslI MsgParticipantsIntersectCourses) False Nothing
((coursesRes, coursesView), coursesEnc) <- runFormPost . renderAForm FormStandard $ courseSelectForm courseQuery termSchoolAccess (const Nothing) ("participants-intersect" :: Text) (fslI MsgParticipantsIntersectCourses) False Nothing
let formWidget = wrapForm coursesView def
{ formAction = Just . SomeRoute $ ParticipantsIntersectR :#: ("table" :: Text)
, formEncoding = coursesEnc