summaryrefslogtreecommitdiff
path: root/tests/Test/FragmentSpec.hs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Test/FragmentSpec.hs')
-rw-r--r--tests/Test/FragmentSpec.hs16
1 files changed, 6 insertions, 10 deletions
diff --git a/tests/Test/FragmentSpec.hs b/tests/Test/FragmentSpec.hs
index 27b08a2..8ee1ad2 100644
--- a/tests/Test/FragmentSpec.hs
+++ b/tests/Test/FragmentSpec.hs
@@ -108,20 +108,16 @@ spec = do
it "embeds inline fragments without type" $ do
let sourceQuery = [r|{
- garment {
- circumference
- ... {
- size
- }
+ circumference
+ ... {
+ size
}
}|]
- actual <- graphql (toSchema "garment" $ garment "Hat") sourceQuery
+ actual <- graphql (toSchema "circumference" circumference) sourceQuery
let expected = HashMap.singleton "data"
$ Aeson.object
- [ "garment" .= Aeson.object
- [ "circumference" .= (60 :: Int)
- , "size" .= ("L" :: Text)
- ]
+ [ "circumference" .= (60 :: Int)
+ , "size" .= ("L" :: Text)
]
in actual `shouldResolveTo` expected