fix: Fatal error when requesting limit=0 and db-max-rows is set (#2560)

This commit is contained in:
Laurence Isla
2022-11-04 18:14:16 -05:00
committed by GitHub
parent c8e4f38984
commit b8c5d212ea
5 changed files with 19 additions and 3 deletions
@@ -114,3 +114,10 @@ spec =
{ "first_name": "Daniel B.", "last_name": "Lyon" },
{ "first_name": "Edwin S.", "last_name": "Smith" } ]|]
{ matchStatus = 200 }
context "max-rows is set and limits are requested" $ do
it "should work with limit 0" $
get "/items?limit=0"
`shouldRespondWith`
[json| [] |]
{ matchHeaders = ["Content-Range" <:> "*/*"] }