@@ -26,10 +26,6 @@ def setup
2626 @tiny_parser = GraphQLDocs ::Parser . new ( tiny_schema , { } )
2727 @tiny_results = @tiny_parser . parse
2828
29- named_root_schema = File . read ( File . join ( fixtures_dir , 'named-root-schema.graphql' ) )
30- @named_root_parser = GraphQLDocs ::Parser . new ( named_root_schema , { } )
31- @named_root_results = @named_root_parser . parse
32-
3329 @output_dir = File . join ( fixtures_dir , 'output' )
3430 end
3531
@@ -66,6 +62,7 @@ def test_that_it_works
6662 assert File . exist? File . join ( @output_dir , 'enum' , 'issuestate' , 'index.html' )
6763 assert File . exist? File . join ( @output_dir , 'input_object' , 'projectorder' , 'index.html' )
6864 assert File . exist? File . join ( @output_dir , 'interface' , 'reactable' , 'index.html' )
65+ assert File . exist? File . join ( @output_dir , 'query' , 'codeofconduct' , 'index.html' )
6966 assert File . exist? File . join ( @output_dir , 'mutation' , 'addcomment' , 'index.html' )
7067 assert File . exist? File . join ( @output_dir , 'object' , 'repository' , 'index.html' )
7168 assert File . exist? File . join ( @output_dir , 'scalar' , 'boolean' , 'index.html' )
@@ -136,18 +133,6 @@ def test_that_it_sets_classes
136133 assert_match ( /<div class="field-entry my-4">/ , object )
137134 end
138135
139- def test_that_named_query_root_generates_fields
140- options = deep_copy ( GraphQLDocs ::Configuration ::GRAPHQLDOCS_DEFAULTS )
141- options [ :output_dir ] = @output_dir
142-
143- generator = GraphQLDocs ::Generator . new ( @named_root_results , options )
144- generator . generate
145-
146- object = File . read File . join ( @output_dir , 'operation' , 'query' , 'index.html' )
147-
148- assert_match ( /Do a thing/ , object )
149- end
150-
151136 def test_that_missing_landing_pages_are_reported
152137 options = deep_copy ( GraphQLDocs ::Configuration ::GRAPHQLDOCS_DEFAULTS )
153138 options [ :landing_pages ] [ :index ] = 'BOGUS'
@@ -202,9 +187,9 @@ def test_that_empty_html_lines_not_interpreted_by_markdown
202187 generator = GraphQLDocs ::Generator . new ( @tiny_results , options )
203188 generator . generate
204189
205- contents = File . read File . join ( @output_dir , 'operation ' , 'query ' , 'index.html' )
190+ contents = File . read File . join ( @output_dir , 'query ' , 'codeofconduct ' , 'index.html' )
206191
207- assert_match ( %r{<td> \s +< p>The code of conduct's key</p> \s +</td >} , contents )
192+ assert_match ( %r{<p>The code of conduct's key</p>} , contents )
208193 end
209194
210195 def test_that_non_empty_html_lines_not_interpreted_by_markdown
@@ -216,6 +201,7 @@ def test_that_non_empty_html_lines_not_interpreted_by_markdown
216201
217202 contents = File . read File . join ( @output_dir , 'input_object' , 'projectorder' , 'index.html' )
218203
219- assert_match %r{<div class="description-wrapper">\n <p>The direction in which to order projects by the specified field.</p>\s +</div>} , contents
204+ assert_match %r{<div class="description-wrapper">\n <p>The direction in which to order projects by the specified field.</p>\s +</div>} ,
205+ contents
220206 end
221207end
0 commit comments