Skip to content

Commit

Permalink
test: query the empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-chavez committed Nov 3, 2023
1 parent 96ca177 commit ed90774
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/spec/Feature/Query/QuerySpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1397,3 +1397,13 @@ spec actualPgVersion = do
{ matchStatus = 404
, matchHeaders = [matchContentTypeJson]
}

context "searching for an empty string" $ do
it "works with an empty eq filter" $
get "/empty_string?string=eq.&select=id,string" `shouldRespondWith`
[json|
[{"id":1,"string":""}]
|]
{ matchStatus = 200
, matchHeaders = [matchContentTypeJson]
}
2 changes: 2 additions & 0 deletions test/spec/fixtures/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3625,3 +3625,5 @@ create aggregate test.bom_csv_agg (test.lines) (
, sfunc = bom_csv_trans
, finalfunc = bom_csv_final
);

create table empty_string as select 1 as id, ''::text as string;

0 comments on commit ed90774

Please sign in to comment.