Fix overloading of functions with unnamed arguments (specifically for prefer params=single-object)
This commit is contained in:
committed by
Steve Chavez
parent
b091586394
commit
e08bb3a197
@@ -284,6 +284,19 @@ spec actualPgVersion =
|
||||
[json|null|]
|
||||
{ matchHeaders = [matchContentTypeJson] }
|
||||
|
||||
context "different types when overloaded" $ do
|
||||
it "returns composite type" $
|
||||
post "/rpc/ret_point_overloaded" [json|{"x": 1, "y": 2}|] `shouldRespondWith`
|
||||
[json|[{"x": 1, "y": 2}]|]
|
||||
{ matchHeaders = [matchContentTypeJson] }
|
||||
|
||||
it "returns json scalar with prefer single object" $
|
||||
request methodPost "/rpc/ret_point_overloaded" [("Prefer","params=single-object")]
|
||||
[json|{"x": 1, "y": 2}|]
|
||||
`shouldRespondWith`
|
||||
[json|{"x": 1, "y": 2}|]
|
||||
{ matchHeaders = [matchContentTypeJson] }
|
||||
|
||||
context "proc argument types" $ do
|
||||
-- different syntax for array needed for pg<10
|
||||
when (actualPgVersion < pgVersion100) $
|
||||
|
||||
Reference in New Issue
Block a user