test/controllers/graphql/voyager/rails/explorers_controller_test.rb in graphql-voyager-rails-1.0.2 vs test/controllers/graphql/voyager/rails/explorers_controller_test.rb in graphql-voyager-rails-1.0.3

- old
+ new

@@ -1,19 +1,19 @@ # frozen_string_literal: true require 'test_helper' -module GraphQL +module Graphql module Voyager module Rails class ExplorersControllerTest < ActionController::TestCase setup do - @routes = GraphQL::Voyager::Rails::Engine.routes + @routes = Graphql::Voyager::Rails::Engine.routes end teardown do - GraphQL::Voyager::Rails.config.headers = {} + Graphql::Voyager::Rails.config.headers = {} end def graphql_params { params: { graphql_path: '/my/endpoint' } } end @@ -24,10 +24,10 @@ assert_includes(@response.body, 'my/endpoint', 'it uses the provided path') assert_match(/application-\w+\.js/, @response.body, 'it includes assets') end test 'it renders headers' do - GraphQL::Voyager::Rails.config.headers['Nonsense-Header'] = ->(_view_ctx) { 'Value' } + Graphql::Voyager::Rails.config.headers['Nonsense-Header'] = ->(_view_ctx) { 'Value' } get :show, graphql_params assert_includes(@response.body, %(\"Nonsense-Header\":\"Value\")) assert_includes(@response.body, %(\"X-CSRF-Token\")) end end