diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-03 00:11:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-03 00:11:07 +0300 |
commit | eb1755b2d90efcc161774f66ccd2317ad4c471de (patch) | |
tree | 9404125b4bec27588f2a479470e46a27043d94f0 /spec/rubocop | |
parent | bf2439c21308c74e437b872180046b39a61734b5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/rubocop')
-rw-r--r-- | spec/rubocop/cop/graphql/authorize_types_spec.rb | 30 |
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 |