summaryrefslogtreecommitdiff
path: root/tests/Language
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2024-12-01 21:47:29 +0100
committerEugen Wissner <belka@caraus.de>2024-12-01 21:53:01 +0100
commit7ea76865e628b348fb8d5089aed9cc300cc653be (patch)
treea7b8857025e394036af47193491543b30156ca2e /tests/Language
parent2dcefff76ad4b889a386f3431baa9ee2b4c80568 (diff)
downloadgraphql-7ea76865e628b348fb8d5089aed9cc300cc653be.tar.gz
Validate the subscription root
…not to be an introspection field.
Diffstat (limited to 'tests/Language')
-rw-r--r--tests/Language/GraphQL/Validate/RulesSpec.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/Language/GraphQL/Validate/RulesSpec.hs b/tests/Language/GraphQL/Validate/RulesSpec.hs
index af3b38e..9ec74c3 100644
--- a/tests/Language/GraphQL/Validate/RulesSpec.hs
+++ b/tests/Language/GraphQL/Validate/RulesSpec.hs
@@ -18,7 +18,7 @@ import qualified Language.GraphQL.AST.DirectiveLocation as DirectiveLocation
import qualified Language.GraphQL.Type.In as In
import qualified Language.GraphQL.Type.Out as Out
import Language.GraphQL.Validate
-import Test.Hspec (Spec, context, describe, it, shouldBe, shouldContain, xit)
+import Test.Hspec (Spec, context, describe, it, shouldBe, shouldContain)
import Text.Megaparsec (parse, errorBundlePretty)
petSchema :: Schema IO
@@ -206,14 +206,14 @@ spec =
}
in validate queryString `shouldContain` [expected]
- xit "rejects an introspection field as the subscription root" $
+ it "rejects an introspection field as the subscription root" $
let queryString = "subscription sub {\n\
\ __typename\n\
\}"
expected = Error
{ message =
- "Subscription \"sub\" must select only one top \
- \level field."
+ "Subscription \"sub\" must select exactly one top \
+ \level field, which must not be an introspection field."
, locations = [AST.Location 1 1]
}
in validate queryString `shouldContain` [expected]