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-08-04 00:09:39 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-04 00:09:39 +0300
commit4bf395cded929b1f2d2419079d8107604c9f930f (patch)
treed6edb3ab04e1a8241f9ac44ebb789cfc6ebaeff9 /spec/rubocop
parent49058851264455c22a5ba00c8671b7d4cdfd8ee9 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/rubocop')
-rw-r--r--spec/rubocop/cop/gitlab/mark_used_feature_flags_spec.rb2
-rw-r--r--spec/rubocop/cop/graphql/descriptions_spec.rb20
-rw-r--r--spec/rubocop/cop/graphql/id_type_spec.rb2
-rw-r--r--spec/rubocop/cop/graphql/json_type_spec.rb4
4 files changed, 14 insertions, 14 deletions
diff --git a/spec/rubocop/cop/gitlab/mark_used_feature_flags_spec.rb b/spec/rubocop/cop/gitlab/mark_used_feature_flags_spec.rb
index 30028a1f1aa..35b21477d80 100644
--- a/spec/rubocop/cop/gitlab/mark_used_feature_flags_spec.rb
+++ b/spec/rubocop/cop/gitlab/mark_used_feature_flags_spec.rb
@@ -222,7 +222,7 @@ RSpec.describe RuboCop::Cop::Gitlab::MarkUsedFeatureFlags do
include_examples 'does not set any flags as used', 'field :solution'
include_examples 'does not set any flags as used', 'field :runners, Types::Ci::RunnerType.connection_type'
include_examples 'does not set any flags as used', 'field :runners, Types::Ci::RunnerType.connection_type, null: true, description: "hello world"'
- include_examples 'does not set any flags as used', 'field :solution, type: GraphQL::STRING_TYPE, null: true, description: "URL to the vulnerabilitys details page."'
+ include_examples 'does not set any flags as used', 'field :solution, type: GraphQL::Types::String, null: true, description: "URL to the vulnerabilitys details page."'
end
describe "tracking of usage data metrics known events happens at the beginning of inspection" do
diff --git a/spec/rubocop/cop/graphql/descriptions_spec.rb b/spec/rubocop/cop/graphql/descriptions_spec.rb
index 9709a253bdc..f11b5346843 100644
--- a/spec/rubocop/cop/graphql/descriptions_spec.rb
+++ b/spec/rubocop/cop/graphql/descriptions_spec.rb
@@ -13,7 +13,7 @@ RSpec.describe RuboCop::Cop::Graphql::Descriptions do
class FakeType < BaseObject
field :a_thing,
^^^^^^^^^^^^^^^ Please add a `description` property.
- GraphQL::STRING_TYPE,
+ GraphQL::Types::String,
null: false
end
end
@@ -26,7 +26,7 @@ RSpec.describe RuboCop::Cop::Graphql::Descriptions do
class FakeType < BaseObject
field :a_thing,
^^^^^^^^^^^^^^^ `description` strings must end with a `.`.
- GraphQL::STRING_TYPE,
+ GraphQL::Types::String,
null: false,
description: 'A descriptive description'
end
@@ -39,7 +39,7 @@ RSpec.describe RuboCop::Cop::Graphql::Descriptions do
module Types
class FakeType < BaseObject
field :a_thing,
- GraphQL::STRING_TYPE,
+ GraphQL::Types::String,
null: false,
description: 'A descriptive description.'
end
@@ -65,7 +65,7 @@ RSpec.describe RuboCop::Cop::Graphql::Descriptions do
class FakeType < BaseObject
argument :a_thing,
^^^^^^^^^^^^^^^^^^ Please add a `description` property.
- GraphQL::STRING_TYPE,
+ GraphQL::Types::String,
null: false
end
end
@@ -78,7 +78,7 @@ RSpec.describe RuboCop::Cop::Graphql::Descriptions do
class FakeType < BaseObject
argument :a_thing,
^^^^^^^^^^^^^^^^^^ `description` strings must end with a `.`.
- GraphQL::STRING_TYPE,
+ GraphQL::Types::String,
null: false,
description: 'Behold! A description'
end
@@ -91,7 +91,7 @@ RSpec.describe RuboCop::Cop::Graphql::Descriptions do
module Types
class FakeType < BaseObject
argument :a_thing,
- GraphQL::STRING_TYPE,
+ GraphQL::Types::String,
null: false,
description: 'Behold! A description.'
end
@@ -151,7 +151,7 @@ RSpec.describe RuboCop::Cop::Graphql::Descriptions do
class FakeType < BaseObject
field :a_thing,
^^^^^^^^^^^^^^^ `description` strings must end with a `.`.
- GraphQL::STRING_TYPE,
+ GraphQL::Types::String,
null: false,
description: 'Behold! A description'
end
@@ -162,7 +162,7 @@ RSpec.describe RuboCop::Cop::Graphql::Descriptions do
module Types
class FakeType < BaseObject
field :a_thing,
- GraphQL::STRING_TYPE,
+ GraphQL::Types::String,
null: false,
description: 'Behold! A description.'
end
@@ -176,7 +176,7 @@ RSpec.describe RuboCop::Cop::Graphql::Descriptions do
class FakeType < BaseObject
field :a_thing,
^^^^^^^^^^^^^^^ `description` strings must end with a `.`.
- GraphQL::STRING_TYPE,
+ GraphQL::Types::String,
null: false,
description: <<~DESC
Behold! A description
@@ -189,7 +189,7 @@ RSpec.describe RuboCop::Cop::Graphql::Descriptions do
module Types
class FakeType < BaseObject
field :a_thing,
- GraphQL::STRING_TYPE,
+ GraphQL::Types::String,
null: false,
description: <<~DESC
Behold! A description.
diff --git a/spec/rubocop/cop/graphql/id_type_spec.rb b/spec/rubocop/cop/graphql/id_type_spec.rb
index 771e4e32dd2..d71031c6e1a 100644
--- a/spec/rubocop/cop/graphql/id_type_spec.rb
+++ b/spec/rubocop/cop/graphql/id_type_spec.rb
@@ -24,7 +24,7 @@ RSpec.describe RuboCop::Cop::Graphql::IDType do
end
end
- it 'does not add an offense for calls to #argument without GraphQL::ID_TYPE' do
+ it 'does not add an offense for calls to #argument without GraphQL::Types::ID' do
expect_no_offenses(<<~TYPE.strip)
argument :some_arg, ::Types::GlobalIDType[::Awardable], some: other, params: do_not_matter
TYPE
diff --git a/spec/rubocop/cop/graphql/json_type_spec.rb b/spec/rubocop/cop/graphql/json_type_spec.rb
index 50437953c1d..882e2b2ef88 100644
--- a/spec/rubocop/cop/graphql/json_type_spec.rb
+++ b/spec/rubocop/cop/graphql/json_type_spec.rb
@@ -32,7 +32,7 @@ RSpec.describe RuboCop::Cop::Graphql::JSONType do
it 'does not add an offense for other types' do
expect_no_offenses(<<~RUBY.strip)
class MyType
- field :some_field, GraphQL::STRING_TYPE
+ field :some_field, GraphQL::Types::String
end
RUBY
end
@@ -60,7 +60,7 @@ RSpec.describe RuboCop::Cop::Graphql::JSONType do
it 'does not add an offense for other types' do
expect_no_offenses(<<~RUBY.strip)
class MyType
- argument :some_arg, GraphQL::STRING_TYPE
+ argument :some_arg, GraphQL::Types::String
end
RUBY
end