diff options
Diffstat (limited to 'spec/rubocop/cop/graphql/id_type_spec.rb')
-rw-r--r-- | spec/rubocop/cop/graphql/id_type_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/rubocop/cop/graphql/id_type_spec.rb b/spec/rubocop/cop/graphql/id_type_spec.rb index a566488b118..d71031c6e1a 100644 --- a/spec/rubocop/cop/graphql/id_type_spec.rb +++ b/spec/rubocop/cop/graphql/id_type_spec.rb @@ -7,10 +7,10 @@ require_relative '../../../../rubocop/cop/graphql/id_type' RSpec.describe RuboCop::Cop::Graphql::IDType do subject(:cop) { described_class.new } - it 'adds an offense when GraphQL::ID_TYPE is used as a param to #argument' do + it 'adds an offense when GraphQL::Types::ID is used as a param to #argument' do expect_offense(<<~TYPE) - argument :some_arg, GraphQL::ID_TYPE, some: other, params: do_not_matter - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Do not use GraphQL::ID_TYPE, use a specific GlobalIDType instead + argument :some_arg, GraphQL::Types::ID, some: other, params: do_not_matter + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Do not use GraphQL::Types::ID, use a specific GlobalIDType instead TYPE end @@ -18,13 +18,13 @@ RSpec.describe RuboCop::Cop::Graphql::IDType do RuboCop::Cop::Graphql::IDType::WHITELISTED_ARGUMENTS.each do |arg| it "does not add an offense for calls to #argument with #{arg} as argument name" do expect_no_offenses(<<~TYPE.strip) - argument #{arg}, GraphQL::ID_TYPE, some: other, params: do_not_matter + argument #{arg}, GraphQL::Types::ID, some: other, params: do_not_matter TYPE end 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 |