Use brackets to specify subqueries

This commit is contained in:
Joe Nelson
2015-11-23 10:58:04 -08:00
parent 64da08b220
commit 029276bd62
3 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ spec = afterAll_ resetDb $ around withApp $ do
}
it "includes related data after insert" $
request methodPost "/projects?select=id,name,clients(id,name)" [("Prefer", "return=representation")]
request methodPost "/projects?select=id,name,clients{id,name}" [("Prefer", "return=representation")]
[str|{"id":5,"name":"New Project","client_id":2}|] `shouldRespondWith` ResponseMatcher {
matchBody = Just [str|{"id":5,"name":"New Project","clients":{"id":2,"name":"Apple"}}|]
, matchStatus = 201