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 } |]
|
||||
|
||||
Vendored
+8
@@ -3285,3 +3285,11 @@ BEGIN
|
||||
END IF;
|
||||
END
|
||||
$do$;
|
||||
|
||||
create domain devil_int as int
|
||||
default 666;
|
||||
|
||||
create table evil_friends(
|
||||
id devil_int
|
||||
, name text
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user