diff options
Diffstat (limited to 'spec/rubocop/cop/graphql')
-rw-r--r-- | spec/rubocop/cop/graphql/descriptions_spec.rb | 20 | ||||
-rw-r--r-- | spec/rubocop/cop/graphql/id_type_spec.rb | 2 | ||||
-rw-r--r-- | spec/rubocop/cop/graphql/json_type_spec.rb | 4 |
3 files changed, 13 insertions, 13 deletions
diff --git a/spec/rubocop/cop/graphql/descriptions_spec.rb b/spec/rubocop/cop/graphql/descriptions_spec.rb index 9709a253bdc..f11b5346843 100644 --- a/spec/rubocop/cop/graphql/descriptions_spec.rb +++ b/spec/rubocop/cop/graphql/descriptions_spec.rb @@ -13,7 +13,7 @@ RSpec.describe RuboCop::Cop::Graphql::Descriptions do class FakeType < BaseObject field :a_thing, ^^^^^^^^^^^^^^^ Please add a `description` property. - GraphQL::STRING_TYPE, + GraphQL::Types::String, null: false end end @@ -26,7 +26,7 @@ RSpec.describe RuboCop::Cop::Graphql::Descriptions do class FakeType < BaseObject field :a_thing, ^^^^^^^^^^^^^^^ `description` strings must end with a `.`. - GraphQL::STRING_TYPE, + GraphQL::Types::String, null: false, description: 'A descriptive description' end @@ -39,7 +39,7 @@ RSpec.describe RuboCop::Cop::Graphql::Descriptions do module Types class FakeType < BaseObject field :a_thing, - GraphQL::STRING_TYPE, + GraphQL::Types::String, null: false, description: 'A descriptive description.' end @@ -65,7 +65,7 @@ RSpec.describe RuboCop::Cop::Graphql::Descriptions do class FakeType < BaseObject argument :a_thing, ^^^^^^^^^^^^^^^^^^ Please add a `description` property. - GraphQL::STRING_TYPE, + GraphQL::Types::String, null: false end end @@ -78,7 +78,7 @@ RSpec.describe RuboCop::Cop::Graphql::Descriptions do class FakeType < BaseObject argument :a_thing, ^^^^^^^^^^^^^^^^^^ `description` strings must end with a `.`. - GraphQL::STRING_TYPE, + GraphQL::Types::String, null: false, description: 'Behold! A description' end @@ -91,7 +91,7 @@ RSpec.describe RuboCop::Cop::Graphql::Descriptions do module Types class FakeType < BaseObject argument :a_thing, - GraphQL::STRING_TYPE, + GraphQL::Types::String, null: false, description: 'Behold! A description.' end @@ -151,7 +151,7 @@ RSpec.describe RuboCop::Cop::Graphql::Descriptions do class FakeType < BaseObject field :a_thing, ^^^^^^^^^^^^^^^ `description` strings must end with a `.`. - GraphQL::STRING_TYPE, + GraphQL::Types::String, null: false, description: 'Behold! A description' end @@ -162,7 +162,7 @@ RSpec.describe RuboCop::Cop::Graphql::Descriptions do module Types class FakeType < BaseObject field :a_thing, - GraphQL::STRING_TYPE, + GraphQL::Types::String, null: false, description: 'Behold! A description.' end @@ -176,7 +176,7 @@ RSpec.describe RuboCop::Cop::Graphql::Descriptions do class FakeType < BaseObject field :a_thing, ^^^^^^^^^^^^^^^ `description` strings must end with a `.`. - GraphQL::STRING_TYPE, + GraphQL::Types::String, null: false, description: <<~DESC Behold! A description @@ -189,7 +189,7 @@ RSpec.describe RuboCop::Cop::Graphql::Descriptions do module Types class FakeType < BaseObject field :a_thing, - GraphQL::STRING_TYPE, + GraphQL::Types::String, null: false, description: <<~DESC Behold! A description. diff --git a/spec/rubocop/cop/graphql/id_type_spec.rb b/spec/rubocop/cop/graphql/id_type_spec.rb index 771e4e32dd2..d71031c6e1a 100644 --- a/spec/rubocop/cop/graphql/id_type_spec.rb +++ b/spec/rubocop/cop/graphql/id_type_spec.rb @@ -24,7 +24,7 @@ RSpec.describe RuboCop::Cop::Graphql::IDType do end end - it 'does not add an offense for calls to #argument without GraphQL::ID_TYPE' do + it 'does not add an offense for calls to #argument without GraphQL::Types::ID' do expect_no_offenses(<<~TYPE.strip) argument :some_arg, ::Types::GlobalIDType[::Awardable], some: other, params: do_not_matter TYPE diff --git a/spec/rubocop/cop/graphql/json_type_spec.rb b/spec/rubocop/cop/graphql/json_type_spec.rb index 50437953c1d..882e2b2ef88 100644 --- a/spec/rubocop/cop/graphql/json_type_spec.rb +++ b/spec/rubocop/cop/graphql/json_type_spec.rb @@ -32,7 +32,7 @@ RSpec.describe RuboCop::Cop::Graphql::JSONType do it 'does not add an offense for other types' do expect_no_offenses(<<~RUBY.strip) class MyType - field :some_field, GraphQL::STRING_TYPE + field :some_field, GraphQL::Types::String end RUBY end @@ -60,7 +60,7 @@ RSpec.describe RuboCop::Cop::Graphql::JSONType do it 'does not add an offense for other types' do expect_no_offenses(<<~RUBY.strip) class MyType - argument :some_arg, GraphQL::STRING_TYPE + argument :some_arg, GraphQL::Types::String end RUBY end |