From 0eb19f73d5cd6aaaef8089ccb726d6ca05d76a49 Mon Sep 17 00:00:00 2001 From: aaron levin Date: Wed, 27 Jan 2016 20:13:19 +0100 Subject: [PATCH] Remove errReasonPhrase from servant-client test. --- servant-client/test/Servant/ClientSpec.hs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/servant-client/test/Servant/ClientSpec.hs b/servant-client/test/Servant/ClientSpec.hs index bb0ff44d..b5d879ab 100644 --- a/servant-client/test/Servant/ClientSpec.hs +++ b/servant-client/test/Servant/ClientSpec.hs @@ -177,9 +177,7 @@ basicAuthHandler = authHandler :: AuthHandler Request () authHandler = let handler req = case lookup "AuthHeader" (requestHeaders req) of - Nothing -> throwE (err401 { errBody = "Missing auth header" - , errReasonPhrase = "denied!" - }) + Nothing -> throwE (err401 { errBody = "Missing auth header" }) Just _ -> return () in mkAuthHandler handler @@ -191,9 +189,6 @@ serverConfig = basicAuthHandler :. authHandler :. EmptyConfig authServer :: Application authServer = serve authAPI serverConfig (const (return alice) :<|> const (return alice)) -{- - -} - {-# NOINLINE manager #-} manager :: C.Manager manager = unsafePerformIO $ C.newManager C.defaultManagerSettings @@ -359,7 +354,7 @@ authSpec = beforeAll (startWaiApp authServer) $ afterAll endWaiApp $ do let (_ :<|> getProtected) = client authAPI baseUrl manager let authRequest = mkAuthenticateReq () (\_ req -> SCR.addHeader "Wrong" ("header" :: String) req) Left FailureResponse{..} <- runExceptT (getProtected authRequest) - responseStatus `shouldBe` (Status 401 "denied") + responseStatus `shouldBe` (Status 401 "Unauthorized") -- * utils