diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /spec/rubocop/cop/graphql/id_type_spec.rb | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
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 |