Skip to content

Commit 3bd3eff

Browse files
committed
Add test for failing 400
1 parent 1aeee3e commit 3bd3eff

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

servant-server/test/Servant/Server/ErrorSpec.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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 {{{

0 commit comments

Comments
 (0)