Fix location header for inserted objects with nulls

This commit is contained in:
Joe Nelson
2015-03-15 18:26:32 -07:00
parent ddb5ba8b64
commit 42d3d0de6c
4 changed files with 12 additions and 4 deletions
+5 -3
View File
@@ -69,9 +69,11 @@ spec = afterAll_ resetDb $ around withApp $ do
it "can post nulls" $ do
p <- request methodPost "/no_pk"
[("Prefer", "return=representation")]
[json| { "a":null, "b":null } |]
liftIO $
simpleBody p `shouldBe` [json| { "a":null, "b":null } |]
[json| { "a":null, "b":"foo" } |]
liftIO $ do
simpleBody p `shouldBe` [json| { "a":null, "b":"foo" } |]
simpleHeaders p `shouldSatisfy` matchHeader hLocation "/no_pk\\?a=is.null&b=eq.foo"
simpleStatus p `shouldBe` created201
context "with compound pk supplied" . after_ (clearTable "compound_pk") $
it "builds response location header appropriately" $