fix: Prefer: missing=default with DOMAIN defaults
This commit is contained in:
committed by
Steve Chavez
parent
0a1564ba5a
commit
a17dd41d6b
@@ -529,6 +529,15 @@ spec actualPgVersion = do
|
||||
}|])
|
||||
{ matchStatus = 400 }
|
||||
|
||||
it "inserts a default on a DOMAIN with default" $
|
||||
request methodPost "/evil_friends?columns=id,name" [("Prefer", "return=representation"), ("Prefer", "missing=default")]
|
||||
[json| { "name": "Lu" } |]
|
||||
`shouldRespondWith`
|
||||
[json| [{"id": 666, "name": "Lu"}] |]
|
||||
{ matchStatus = 201
|
||||
, matchHeaders = ["Preference-Applied" <:> "missing=default"]
|
||||
}
|
||||
|
||||
it "inserts json that has duplicate keys" $ do
|
||||
request methodPost "/tbl_w_json" [("Prefer", "return=representation")]
|
||||
[json| { "data": { "a": 1, "a": 2 }, "id": 3 } |]
|
||||
|
||||
Reference in New Issue
Block a user