From 0d65c249185346adab2108fa096fd69ceac935aa Mon Sep 17 00:00:00 2001 From: Ivan Maximov Date: Thu, 6 Feb 2020 22:41:04 +0300 Subject: [PATCH] test for schema description --- src/GraphQLParser.Tests/ParserTests.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/GraphQLParser.Tests/ParserTests.cs b/src/GraphQLParser.Tests/ParserTests.cs index 27f736cb..c0543ef7 100644 --- a/src/GraphQLParser.Tests/ParserTests.cs +++ b/src/GraphQLParser.Tests/ParserTests.cs @@ -201,6 +201,13 @@ public void Parse_KitchenSink_DoesNotThrowError() var typeDef = document.Definitions.OfType().First(d => d.Name.Value == "Foo"); var fieldDef = typeDef.Fields.First(d => d.Name.Value == "three"); Assert.Equal($" multiline comments{NL} with very importand description #{NL} # and symbol # and ##", fieldDef.Comment.Text); + + // Schema description + // https://github.com/graphql/graphql-spec/pull/466 + var comment = document.Definitions.OfType().First().Comment; + comment.ShouldNotBeNull(); + comment.Text.ShouldNotBeNull(); + comment.Text.StartsWith(" Copyright (c) 2015, Facebook, Inc.").ShouldBeTrue(); } }