diff --git a/test/spec/Feature/Query/QuerySpec.hs b/test/spec/Feature/Query/QuerySpec.hs index c78f00c88..073cb4824 100644 --- a/test/spec/Feature/Query/QuerySpec.hs +++ b/test/spec/Feature/Query/QuerySpec.hs @@ -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] + } diff --git a/test/spec/fixtures/schema.sql b/test/spec/fixtures/schema.sql index 6eeac7d06..5a2823378 100644 --- a/test/spec/fixtures/schema.sql +++ b/test/spec/fixtures/schema.sql @@ -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;