From 648d733f3fe9eed1bef385d9307b651138a3ceb4 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 13 Mar 2020 19:05:04 +0100 Subject: [PATCH] chore: fix tests --- config/test-settings.yml | 1 + src/Handler/Allocation/Accept.hs | 2 +- src/Handler/Participants.hs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config/test-settings.yml b/config/test-settings.yml index 5fb61bedf..a8bf9ded8 100644 --- a/config/test-settings.yml +++ b/config/test-settings.yml @@ -8,5 +8,6 @@ log-settings: destination: "test.log" auth-dummy-login: true +server-session-acid-fallback: true job-workers: 1 diff --git a/src/Handler/Allocation/Accept.hs b/src/Handler/Allocation/Accept.hs index 5ac324f9a..4bc740cbe 100644 --- a/src/Handler/Allocation/Accept.hs +++ b/src/Handler/Allocation/Accept.hs @@ -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 diff --git a/src/Handler/Participants.hs b/src/Handler/Participants.hs index 89076bea1..cb5923ef3 100644 --- a/src/Handler/Participants.hs +++ b/src/Handler/Participants.hs @@ -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