Regression test for situation reported in issue #203

This commit is contained in:
Joe Nelson
2015-07-03 22:51:04 -07:00
parent df04d26c15
commit 956f73d997
4 changed files with 27 additions and 2 deletions
+4 -1
View File
@@ -10,6 +10,7 @@ import SpecHelper
spec :: Spec
spec =
beforeAll (clearTable "items" >> createItems 15)
. beforeAll (clearTable "nullable_integer" >> createNullInteger)
. beforeAll (
clearTable "no_pk" >>
createNulls 2 >>
@@ -38,10 +39,12 @@ spec =
, matchHeaders = ["Content-Range" <:> "0-2/3"]
}
it "matches nulls" $
it "matches nulls in varchar and numeric fields alike" $ do
get "/no_pk?a=is.null" `shouldRespondWith`
[json| [{"a": null, "b": null}] |]
get "/nullable_integer?a=is.null" `shouldRespondWith` "[{\"a\":null}]"
it "matches with like" $ do
get "/simple_pk?k=like.*yx" `shouldRespondWith`
"[{\"k\":\"xyyx\",\"extra\":\"u\"}]"