Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-03 00:11:07 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-03 00:11:07 +0300
commiteb1755b2d90efcc161774f66ccd2317ad4c471de (patch)
tree9404125b4bec27588f2a479470e46a27043d94f0 /spec/rubocop
parentbf2439c21308c74e437b872180046b39a61734b5 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/rubocop')
-rw-r--r--spec/rubocop/cop/graphql/authorize_types_spec.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/rubocop/cop/graphql/authorize_types_spec.rb b/spec/rubocop/cop/graphql/authorize_types_spec.rb
index 9242b865b20..cd376bf458c 100644
--- a/spec/rubocop/cop/graphql/authorize_types_spec.rb
+++ b/spec/rubocop/cop/graphql/authorize_types_spec.rb
@@ -63,4 +63,34 @@ RSpec.describe RuboCop::Cop::Graphql::AuthorizeTypes do
end
TYPE
end
+
+ it 'does not add an offense for subtypes of BaseUnion' do
+ expect_no_offenses(<<~TYPE)
+ module Types
+ class AType < BaseUnion
+ possible_types Types::Foo, Types::Bar
+ end
+ end
+ TYPE
+ end
+
+ it 'does not add an offense for subtypes of BaseInputObject' do
+ expect_no_offenses(<<~TYPE)
+ module Types
+ class AType < BaseInputObject
+ argument :a_thing
+ end
+ end
+ TYPE
+ end
+
+ it 'does not add an offense for InputTypes' do
+ expect_no_offenses(<<~TYPE)
+ module Types
+ class AInputType < SomeObjectType
+ argument :a_thing
+ end
+ end
+ TYPE
+ end
end