diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-15 03:13:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-15 03:13:13 +0300 |
commit | 77e775460553ceadedada8779b474e9ecde3e42d (patch) | |
tree | 8dba88a4082ffd0d4b586f525e0a28994195350e /spec/rubocop | |
parent | 30f908f6b9689ecda34474e68c55ce4dba1a9974 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/rubocop')
-rw-r--r-- | spec/rubocop/cop/graphql/old_types_spec.rb | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/spec/rubocop/cop/graphql/old_types_spec.rb b/spec/rubocop/cop/graphql/old_types_spec.rb index 396bf4ce997..5cf3b11548f 100644 --- a/spec/rubocop/cop/graphql/old_types_spec.rb +++ b/spec/rubocop/cop/graphql/old_types_spec.rb @@ -10,10 +10,16 @@ RSpec.describe RuboCop::Cop::Graphql::OldTypes do subject(:cop) { described_class.new } where(:old_type, :message) do - 'GraphQL::ID_TYPE' | 'Avoid using GraphQL::ID_TYPE. Use GraphQL::Types::ID instead' - 'GraphQL::INT_TYPE' | 'Avoid using GraphQL::INT_TYPE. Use GraphQL::Types::Int instead' - 'GraphQL::STRING_TYPE' | 'Avoid using GraphQL::STRING_TYPE. Use GraphQL::Types::String instead' - 'GraphQL::BOOLEAN_TYPE' | 'Avoid using GraphQL::BOOLEAN_TYPE. Use GraphQL::Types::Boolean instead' + 'GraphQL::ID_TYPE' | 'Avoid using GraphQL::ID_TYPE. Use GraphQL::Types::ID instead' + 'GraphQL::INT_TYPE' | 'Avoid using GraphQL::INT_TYPE. Use GraphQL::Types::Int instead' + 'GraphQL::STRING_TYPE' | 'Avoid using GraphQL::STRING_TYPE. Use GraphQL::Types::String instead' + 'GraphQL::BOOLEAN_TYPE' | 'Avoid using GraphQL::BOOLEAN_TYPE. Use GraphQL::Types::Boolean instead' + 'GraphQL::FLOAT_TYPE' | 'Avoid using GraphQL::FLOAT_TYPE. Use GraphQL::Types::Float instead' + '::GraphQL::ID_TYPE' | 'Avoid using GraphQL::ID_TYPE. Use GraphQL::Types::ID instead' + '::GraphQL::INT_TYPE' | 'Avoid using GraphQL::INT_TYPE. Use GraphQL::Types::Int instead' + '::GraphQL::STRING_TYPE' | 'Avoid using GraphQL::STRING_TYPE. Use GraphQL::Types::String instead' + '::GraphQL::BOOLEAN_TYPE' | 'Avoid using GraphQL::BOOLEAN_TYPE. Use GraphQL::Types::Boolean instead' + '::GraphQL::FLOAT_TYPE' | 'Avoid using GraphQL::FLOAT_TYPE. Use GraphQL::Types::Float instead' end with_them do @@ -27,7 +33,7 @@ RSpec.describe RuboCop::Cop::Graphql::OldTypes do RUBY end - it "adds an offense when an old type is used with other keywords" do + it 'adds an offense when an old type is used with other keywords' do expect_offense(<<~RUBY) class MyType field :some_field, #{old_type}, null: true, description: 'My description' |