git.iko.soy/typeable/servant
on master help sign in
Add test for failing 400
commit3bd3eff488a382ece37a481cc28547c5721ab187 authorJulian K. Arni <jkarni@gmail.com> dateTue 26 Jan 2016, 18:47 (11 years ago) parent1aeee3e
1 file changed+4
servant-server/test/Servant/Server/ErrorSpec.hs+4
servant-server/test/Servant/Server/ErrorSpec.hs+4
@@ -168,6 +168,10 @@ errorRetrySpec = describe "Handler search"
168168 request methodGet "a" [jsonCT, jsonAccept] jsonBody
169169 `shouldRespondWith` 200 { matchBody = Just $ encode (4 :: Int) }
170170
171+ it "should not continue when body cannot be decoded" $ do
172+ request methodPost "a" [jsonCT, jsonAccept] "a string"
173+ `shouldRespondWith` 400
174+
171175-- }}}
172176------------------------------------------------------------------------------
173177-- * Error Choice {{{