Skip to content

Commit

Permalink
test: correct limit proc results tests (PostgREST#1951)
Browse files Browse the repository at this point in the history
Query params where being appended using `?` instead of `&`
  • Loading branch information
laurenceisla authored Sep 17, 2021
1 parent 885ff60 commit 243e4f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/Feature/RpcSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,11 @@ spec actualPgVersion =
{ matchHeaders = [matchContentTypeJson] }

it "can limit proc results" $ do
post "/rpc/getallprojects?id=gt.1&id=lt.5&select=id?limit=2&offset=1" [json| {} |]
post "/rpc/getallprojects?id=gt.1&id=lt.5&select=id&limit=2&offset=1" [json| {} |]
`shouldRespondWith` [json|[{"id":3},{"id":4}]|]
{ matchStatus = 200
, matchHeaders = ["Content-Range" <:> "1-2/*"] }
get "/rpc/getallprojects?id=gt.1&id=lt.5&select=id?limit=2&offset=1"
get "/rpc/getallprojects?id=gt.1&id=lt.5&select=id&limit=2&offset=1"
`shouldRespondWith` [json|[{"id":3},{"id":4}]|]
{ matchStatus = 200
, matchHeaders = ["Content-Range" <:> "1-2/*"] }
Expand Down

0 comments on commit 243e4f0

Please sign in to comment.