Can now post nulls, but header link is wrong

affects #166
This commit is contained in:
Joe Nelson
2015-03-15 16:30:42 -07:00
parent 185d5b1c62
commit ddb5ba8b64
2 changed files with 14 additions and 3 deletions
+7
View File
@@ -66,6 +66,13 @@ spec = afterAll_ resetDb $ around withApp $ do
simpleHeaders p `shouldSatisfy` matchHeader hLocation "/no_pk\\?a=eq.bar&b=eq.baz"
simpleStatus p `shouldBe` created201
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 } |]
context "with compound pk supplied" . after_ (clearTable "compound_pk") $
it "builds response location header appropriately" $
post "/compound_pk" [json| { "k1":12, "k2":42 } |]