@@ -157,9 +157,9 @@ spec = do
157157 (Arrow.left show <$> runEitherT (getBody p host)) `shouldReturn` Right p
158158
159159 it "Servant.API.QueryParam" $ withServer $ \ host -> do
160− (Arrow.left show <$> runEitherT (getQueryParam (Just "alice") host)) `shouldReturn` Right alice
161− Left (FailureResponse s _ _) <- runEitherT (getQueryParam (Just "bob") host)
162− statusCode s `shouldBe` 400
160+ Arrow.left show <$> runEitherT (getQueryParam (Just "alice") host) `shouldReturn` Right alice
161+ Left FailureResponse{..} <- runEitherT (getQueryParam (Just "bob") host)
162+ responseStatus `shouldBe` Status 400 "bob not found"
163163
164164 it "Servant.API.QueryParam.QueryParams" $ withServer $ \ host -> do
165165 (Arrow.left show <$> runEitherT (getQueryParams [] host)) `shouldReturn` Right []
@@ -171,22 +171,20 @@ spec = do
171171 it (show flag) $ withServer $ \ host -> do
172172 (Arrow.left show <$> runEitherT (getQueryFlag flag host)) `shouldReturn` Right flag
173173
174−{-
175174 it "Servant.API.MatrixParam" $ withServer $ \ host -> do
176− runEitherT (getMatrixParam (Just "alice") host) `shouldReturn` Right alice
177− Left result <- runEitherT (getMatrixParam (Just "bob") host)
178− result `shouldContain` "bob not found"
175+ Arrow.left show <$> runEitherT (getMatrixParam (Just "alice") host) `shouldReturn` Right alice
176+ Left FailureResponse{..} <- runEitherT (getMatrixParam (Just "bob") host)
177+ responseStatus `shouldBe` Status 400 "bob not found"
179178
180179 it "Servant.API.MatrixParam.MatrixParams" $ withServer $ \ host -> do
181− runEitherT (getMatrixParams [] host) `shouldReturn` Right []
182− runEitherT (getMatrixParams ["alice", "bob"] host)
180+ Arrow.left show <$> runEitherT (getMatrixParams [] host) `shouldReturn` Right []
181+ Arrow.left show <$> runEitherT (getMatrixParams ["alice", "bob"] host)
183182 `shouldReturn` Right [Person "alice" 0, Person "bob" 1]
184183
185184 context "Servant.API.MatrixParam.MatrixFlag" $
186185 forM_ [False, True] $ \ flag ->
187186 it (show flag) $ withServer $ \ host -> do
188− runEitherT (getMatrixFlag flag host) `shouldReturn` Right flag
189−-}
187+ Arrow.left show <$> runEitherT (getMatrixFlag flag host) `shouldReturn` Right flag
190188
191189 it "Servant.API.Raw on success" $ withServer $ \ host -> do
192190 (Arrow.left show <$> runEitherT (getRawSuccess methodGet host))
@@ -214,8 +212,8 @@ spec = do
214212 \ host -> do
215213 let getResponse :: BaseUrl -> EitherT ServantError IO ()
216214 getResponse = client api
217− Left (FailureResponse status _ _) <- runEitherT (getResponse host)
218− status `shouldBe` (Status 500 "error message")
215+ Left FailureResponse{..} <- runEitherT (getResponse host)
216+ responseStatus `shouldBe` (Status 500 "error message")
219217 mapM_ test $
220218 (WrappedApi (Proxy :: Proxy Delete), "Delete") :
221219 (WrappedApi (Proxy :: Proxy (Get '[JSON] ())), "Delete") :