diff options
Diffstat (limited to 'spec/rubocop/cop/graphql/id_type_spec.rb')
-rw-r--r-- | spec/rubocop/cop/graphql/id_type_spec.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/spec/rubocop/cop/graphql/id_type_spec.rb b/spec/rubocop/cop/graphql/id_type_spec.rb index 6135c9fef43..93c01cd7f06 100644 --- a/spec/rubocop/cop/graphql/id_type_spec.rb +++ b/spec/rubocop/cop/graphql/id_type_spec.rb @@ -6,16 +6,13 @@ require 'rubocop' require_relative '../../../../rubocop/cop/graphql/id_type' RSpec.describe RuboCop::Cop::Graphql::IDType do - include CopHelper - subject(:cop) { described_class.new } it 'adds an offense when GraphQL::ID_TYPE is used as a param to #argument' do - inspect_source(<<~TYPE) + 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 TYPE - - expect(cop.offenses.size).to eq 1 end context 'whitelisted arguments' do |