This commit is contained in:
Mark Wotton 2016-05-04 17:37:12 -04:00
parent 05e140314e
commit a79c718705

View file

@ -395,10 +395,9 @@ genAuthSpec = beforeAll (startWaiApp genAuthServer) $ afterAll endWaiApp $ do
(left show <$> runExceptT (getProtected authRequest manager baseUrl)) `shouldReturn` Right alice
it "Also works for more complicated apis" $ \(_, baseUrl) -> do
let (getProtected :<|> getOtherProtected) = client genAuthAPI2
let authRequest = mkAuthenticateReq () (\_ req -> SCR.addHeader "AuthHeader" ("cool" :: String) req)
(left show <$> runExceptT (getProtected authRequest manager baseUrl)) `shouldReturn` Right alice
let (getProtected :<|> getOtherProtected) = client genAuthAPI2 $ authRequest
(left show <$> runExceptT (getProtected manager baseUrl)) `shouldReturn` Right alice
context "Authentication is rejected when requests are not authenticated properly" $ do