Fix unique foreign key in view (#1395)

This commit is contained in:
Steve Chávez
2019-10-16 12:45:38 -05:00
committed by GitHub
parent a3701f5de8
commit 80f763448f
7 changed files with 53 additions and 2 deletions
+9
View File
@@ -1112,3 +1112,12 @@ spec actualPgVersion = do
it "cannot use ltree(in public schema) extension operators if no extra search path added" $
get "/ltree_sample?path=cd.Top.Science.Astronomy" `shouldRespondWith` 400
context "VIEW that has a source FK based on a UNIQUE key" $
it "can be embedded" $
get "/referrals?select=site,link:pages(url)" `shouldRespondWith`
[json| [
{"site":"github.com", "link":{"url":"http://postgrest.org/en/v6.0/api.html"}},
{"site":"hub.docker.com", "link":{"url":"http://postgrest.org/en/v6.0/admin.html"}}
]|]
{ matchHeaders = [matchContentTypeJson] }