summaryrefslogtreecommitdiff
path: root/spec/graphql
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-18 18:09:35 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-18 18:09:35 +0000
commit5bfb8d1fad825eec90b0af688c7cd1b352c9056e (patch)
tree385411919c4186d11a769385ad8dafeef6cc36a7 /spec/graphql
parentaaf59610548d9b0fd01acfd50e831cbe519ecba2 (diff)
downloadgitlab-ce-5bfb8d1fad825eec90b0af688c7cd1b352c9056e.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/graphql')
-rw-r--r--spec/graphql/features/authorization_spec.rb4
-rw-r--r--spec/graphql/features/feature_flag_spec.rb2
-rw-r--r--spec/graphql/gitlab_schema_spec.rb4
-rw-r--r--spec/graphql/types/award_emojis/award_emoji_type_spec.rb2
-rw-r--r--spec/graphql/types/board_type_spec.rb2
-rw-r--r--spec/graphql/types/diff_refs_type_spec.rb2
-rw-r--r--spec/graphql/types/environment_type_spec.rb4
-rw-r--r--spec/graphql/types/error_tracking/sentry_detailed_error_type_spec.rb2
-rw-r--r--spec/graphql/types/error_tracking/sentry_error_collection_type_spec.rb2
-rw-r--r--spec/graphql/types/error_tracking/sentry_error_stack_trace_entry_type_spec.rb2
-rw-r--r--spec/graphql/types/error_tracking/sentry_error_stack_trace_type_spec.rb2
-rw-r--r--spec/graphql/types/error_tracking/sentry_error_type_spec.rb2
-rw-r--r--spec/graphql/types/grafana_integration_type_spec.rb2
-rw-r--r--spec/graphql/types/group_type_spec.rb2
-rw-r--r--spec/graphql/types/issue_type_spec.rb2
-rw-r--r--spec/graphql/types/label_type_spec.rb4
-rw-r--r--spec/graphql/types/merge_request_type_spec.rb4
-rw-r--r--spec/graphql/types/metadata_type_spec.rb2
-rw-r--r--spec/graphql/types/namespace_type_spec.rb4
-rw-r--r--spec/graphql/types/notes/diff_position_type_spec.rb2
-rw-r--r--spec/graphql/types/notes/discussion_type_spec.rb4
-rw-r--r--spec/graphql/types/notes/note_type_spec.rb6
-rw-r--r--spec/graphql/types/notes/noteable_type_spec.rb2
-rw-r--r--spec/graphql/types/permission_types/base_permission_type_spec.rb6
-rw-r--r--spec/graphql/types/permission_types/note_spec.rb2
-rw-r--r--spec/graphql/types/project_statistics_type_spec.rb2
-rw-r--r--spec/graphql/types/project_type_spec.rb2
-rw-r--r--spec/graphql/types/repository_type_spec.rb4
-rw-r--r--spec/graphql/types/root_storage_statistics_type_spec.rb4
-rw-r--r--spec/graphql/types/snippet_type_spec.rb2
-rw-r--r--spec/graphql/types/snippets/blob_type_spec.rb2
-rw-r--r--spec/graphql/types/snippets/blob_viewer_type_spec.rb2
-rw-r--r--spec/graphql/types/todo_type_spec.rb2
-rw-r--r--spec/graphql/types/user_type_spec.rb2
34 files changed, 47 insertions, 47 deletions
diff --git a/spec/graphql/features/authorization_spec.rb b/spec/graphql/features/authorization_spec.rb
index 44f47e6c739..4f54695e5be 100644
--- a/spec/graphql/features/authorization_spec.rb
+++ b/spec/graphql/features/authorization_spec.rb
@@ -9,7 +9,7 @@ describe 'Gitlab::Graphql::Authorization' do
let(:permission_single) { :foo }
let(:permission_collection) { [:foo, :bar] }
let(:test_object) { double(name: 'My name') }
- let(:query_string) { '{ item() { name } }' }
+ let(:query_string) { '{ item { name } }' }
let(:result) { execute_query(query_type)['data'] }
subject { result['item'] }
@@ -177,7 +177,7 @@ describe 'Gitlab::Graphql::Authorization' do
end
describe 'type authorizations when applied to a relay connection' do
- let(:query_string) { '{ item() { edges { node { name } } } }' }
+ let(:query_string) { '{ item { edges { node { name } } } }' }
let(:second_test_object) { double(name: 'Second thing') }
let(:type) do
diff --git a/spec/graphql/features/feature_flag_spec.rb b/spec/graphql/features/feature_flag_spec.rb
index 13b1e472fab..51914cf0ca8 100644
--- a/spec/graphql/features/feature_flag_spec.rb
+++ b/spec/graphql/features/feature_flag_spec.rb
@@ -9,7 +9,7 @@ describe 'Graphql Field feature flags' do
let(:feature_flag) { 'test_feature' }
let(:test_object) { double(name: 'My name') }
- let(:query_string) { '{ item() { name } }' }
+ let(:query_string) { '{ item { name } }' }
let(:result) { execute_query(query_type)['data'] }
subject { result }
diff --git a/spec/graphql/gitlab_schema_spec.rb b/spec/graphql/gitlab_schema_spec.rb
index d0eb0475879..bd22458355c 100644
--- a/spec/graphql/gitlab_schema_spec.rb
+++ b/spec/graphql/gitlab_schema_spec.rb
@@ -27,11 +27,11 @@ describe GitlabSchema do
end
it 'has the base mutation' do
- expect(described_class.mutation).to eq(::Types::MutationType.to_graphql)
+ expect(described_class.mutation).to eq(::Types::MutationType)
end
it 'has the base query' do
- expect(described_class.query).to eq(::Types::QueryType.to_graphql)
+ expect(described_class.query).to eq(::Types::QueryType)
end
it 'paginates active record relations using `Connections::Keyset::Connection`' do
diff --git a/spec/graphql/types/award_emojis/award_emoji_type_spec.rb b/spec/graphql/types/award_emojis/award_emoji_type_spec.rb
index 5663a3d7195..de5ece3b749 100644
--- a/spec/graphql/types/award_emojis/award_emoji_type_spec.rb
+++ b/spec/graphql/types/award_emojis/award_emoji_type_spec.rb
@@ -5,7 +5,7 @@ require 'spec_helper'
describe GitlabSchema.types['AwardEmoji'] do
it { expect(described_class.graphql_name).to eq('AwardEmoji') }
- it { is_expected.to require_graphql_authorizations(:read_emoji) }
+ it { expect(described_class).to require_graphql_authorizations(:read_emoji) }
it { expect(described_class).to have_graphql_fields(:description, :unicode_version, :emoji, :name, :unicode, :user) }
end
diff --git a/spec/graphql/types/board_type_spec.rb b/spec/graphql/types/board_type_spec.rb
index 9d18065bbcd..1ca4bf18b57 100644
--- a/spec/graphql/types/board_type_spec.rb
+++ b/spec/graphql/types/board_type_spec.rb
@@ -10,6 +10,6 @@ describe GitlabSchema.types['Board'] do
it 'has specific fields' do
expected_fields = %w[id name]
- is_expected.to include_graphql_fields(*expected_fields)
+ expect(described_class).to include_graphql_fields(*expected_fields)
end
end
diff --git a/spec/graphql/types/diff_refs_type_spec.rb b/spec/graphql/types/diff_refs_type_spec.rb
index 85225e5809c..a6ead27455f 100644
--- a/spec/graphql/types/diff_refs_type_spec.rb
+++ b/spec/graphql/types/diff_refs_type_spec.rb
@@ -5,7 +5,7 @@ require 'spec_helper'
describe GitlabSchema.types['DiffRefs'] do
it { expect(described_class.graphql_name).to eq('DiffRefs') }
- it { is_expected.to have_graphql_fields(:head_sha, :base_sha, :start_sha).only }
+ it { expect(described_class).to have_graphql_fields(:head_sha, :base_sha, :start_sha).only }
it { expect(described_class.fields['headSha'].type).to be_non_null }
it { expect(described_class.fields['baseSha'].type).not_to be_non_null }
diff --git a/spec/graphql/types/environment_type_spec.rb b/spec/graphql/types/environment_type_spec.rb
index cf30893b3ca..9e8f13e4c2e 100644
--- a/spec/graphql/types/environment_type_spec.rb
+++ b/spec/graphql/types/environment_type_spec.rb
@@ -10,8 +10,8 @@ describe GitlabSchema.types['Environment'] do
name id
]
- is_expected.to have_graphql_fields(*expected_fields)
+ expect(described_class).to have_graphql_fields(*expected_fields)
end
- it { is_expected.to require_graphql_authorizations(:read_environment) }
+ it { expect(described_class).to require_graphql_authorizations(:read_environment) }
end
diff --git a/spec/graphql/types/error_tracking/sentry_detailed_error_type_spec.rb b/spec/graphql/types/error_tracking/sentry_detailed_error_type_spec.rb
index 3a512fee3b3..44652f831b5 100644
--- a/spec/graphql/types/error_tracking/sentry_detailed_error_type_spec.rb
+++ b/spec/graphql/types/error_tracking/sentry_detailed_error_type_spec.rb
@@ -37,6 +37,6 @@ describe GitlabSchema.types['SentryDetailedError'] do
tags
]
- is_expected.to have_graphql_fields(*expected_fields)
+ expect(described_class).to have_graphql_fields(*expected_fields)
end
end
diff --git a/spec/graphql/types/error_tracking/sentry_error_collection_type_spec.rb b/spec/graphql/types/error_tracking/sentry_error_collection_type_spec.rb
index 3de0a359c15..20ec31391d8 100644
--- a/spec/graphql/types/error_tracking/sentry_error_collection_type_spec.rb
+++ b/spec/graphql/types/error_tracking/sentry_error_collection_type_spec.rb
@@ -15,7 +15,7 @@ describe GitlabSchema.types['SentryErrorCollection'] do
error_stack_trace
]
- is_expected.to have_graphql_fields(*expected_fields)
+ expect(described_class).to have_graphql_fields(*expected_fields)
end
describe 'errors field' do
diff --git a/spec/graphql/types/error_tracking/sentry_error_stack_trace_entry_type_spec.rb b/spec/graphql/types/error_tracking/sentry_error_stack_trace_entry_type_spec.rb
index ce5fade6fcc..05cc2ca7612 100644
--- a/spec/graphql/types/error_tracking/sentry_error_stack_trace_entry_type_spec.rb
+++ b/spec/graphql/types/error_tracking/sentry_error_stack_trace_entry_type_spec.rb
@@ -14,6 +14,6 @@ describe GitlabSchema.types['SentryErrorStackTraceEntry'] do
trace_context
]
- is_expected.to have_graphql_fields(*expected_fields)
+ expect(described_class).to have_graphql_fields(*expected_fields)
end
end
diff --git a/spec/graphql/types/error_tracking/sentry_error_stack_trace_type_spec.rb b/spec/graphql/types/error_tracking/sentry_error_stack_trace_type_spec.rb
index ac41e6903e5..2a422228f72 100644
--- a/spec/graphql/types/error_tracking/sentry_error_stack_trace_type_spec.rb
+++ b/spec/graphql/types/error_tracking/sentry_error_stack_trace_type_spec.rb
@@ -14,6 +14,6 @@ describe GitlabSchema.types['SentryErrorStackTrace'] do
stack_trace_entries
]
- is_expected.to have_graphql_fields(*expected_fields)
+ expect(described_class).to have_graphql_fields(*expected_fields)
end
end
diff --git a/spec/graphql/types/error_tracking/sentry_error_type_spec.rb b/spec/graphql/types/error_tracking/sentry_error_type_spec.rb
index 51acd035024..4676d91ef9c 100644
--- a/spec/graphql/types/error_tracking/sentry_error_type_spec.rb
+++ b/spec/graphql/types/error_tracking/sentry_error_type_spec.rb
@@ -26,6 +26,6 @@ describe GitlabSchema.types['SentryError'] do
frequency
]
- is_expected.to have_graphql_fields(*expected_fields)
+ expect(described_class).to have_graphql_fields(*expected_fields)
end
end
diff --git a/spec/graphql/types/grafana_integration_type_spec.rb b/spec/graphql/types/grafana_integration_type_spec.rb
index ddfedc5a75c..ac26911acbf 100644
--- a/spec/graphql/types/grafana_integration_type_spec.rb
+++ b/spec/graphql/types/grafana_integration_type_spec.rb
@@ -18,5 +18,5 @@ describe GitlabSchema.types['GrafanaIntegration'] do
it { expect(described_class).to require_graphql_authorizations(:admin_operations) }
- it { is_expected.to have_graphql_fields(*expected_fields) }
+ it { expect(described_class).to have_graphql_fields(*expected_fields) }
end
diff --git a/spec/graphql/types/group_type_spec.rb b/spec/graphql/types/group_type_spec.rb
index 240dd9fa5e2..532f1a4b53d 100644
--- a/spec/graphql/types/group_type_spec.rb
+++ b/spec/graphql/types/group_type_spec.rb
@@ -19,7 +19,7 @@ describe GitlabSchema.types['Group'] do
mentions_disabled parent boards
]
- is_expected.to include_graphql_fields(*expected_fields)
+ expect(described_class).to include_graphql_fields(*expected_fields)
end
describe 'boards field' do
diff --git a/spec/graphql/types/issue_type_spec.rb b/spec/graphql/types/issue_type_spec.rb
index daa2224ef20..ebe48c17c11 100644
--- a/spec/graphql/types/issue_type_spec.rb
+++ b/spec/graphql/types/issue_type_spec.rb
@@ -9,7 +9,7 @@ describe GitlabSchema.types['Issue'] do
it { expect(described_class).to require_graphql_authorizations(:read_issue) }
- it { expect(described_class.interfaces).to include(Types::Notes::NoteableType.to_graphql) }
+ it { expect(described_class.interfaces).to include(Types::Notes::NoteableType) }
it 'has specific fields' do
fields = %i[iid title description state reference author assignees participants labels milestone due_date
diff --git a/spec/graphql/types/label_type_spec.rb b/spec/graphql/types/label_type_spec.rb
index a023a75eeff..71b86d9b528 100644
--- a/spec/graphql/types/label_type_spec.rb
+++ b/spec/graphql/types/label_type_spec.rb
@@ -5,8 +5,8 @@ describe GitlabSchema.types['Label'] do
it 'has the correct fields' do
expected_fields = [:id, :description, :description_html, :title, :color, :text_color]
- is_expected.to have_graphql_fields(*expected_fields)
+ expect(described_class).to have_graphql_fields(*expected_fields)
end
- it { is_expected.to require_graphql_authorizations(:read_label) }
+ it { expect(described_class).to require_graphql_authorizations(:read_label) }
end
diff --git a/spec/graphql/types/merge_request_type_spec.rb b/spec/graphql/types/merge_request_type_spec.rb
index 04e9bb6861f..0c83ebd3de9 100644
--- a/spec/graphql/types/merge_request_type_spec.rb
+++ b/spec/graphql/types/merge_request_type_spec.rb
@@ -7,7 +7,7 @@ describe GitlabSchema.types['MergeRequest'] do
it { expect(described_class).to require_graphql_authorizations(:read_merge_request) }
- it { expect(described_class.interfaces).to include(Types::Notes::NoteableType.to_graphql) }
+ it { expect(described_class.interfaces).to include(Types::Notes::NoteableType) }
it 'has the expected fields' do
expected_fields = %w[
@@ -25,6 +25,6 @@ describe GitlabSchema.types['MergeRequest'] do
total_time_spent reference
]
- is_expected.to have_graphql_fields(*expected_fields)
+ expect(described_class).to have_graphql_fields(*expected_fields)
end
end
diff --git a/spec/graphql/types/metadata_type_spec.rb b/spec/graphql/types/metadata_type_spec.rb
index 2988f3c6ba5..c8270a8c2f5 100644
--- a/spec/graphql/types/metadata_type_spec.rb
+++ b/spec/graphql/types/metadata_type_spec.rb
@@ -4,5 +4,5 @@ require 'spec_helper'
describe GitlabSchema.types['Metadata'] do
it { expect(described_class.graphql_name).to eq('Metadata') }
- it { is_expected.to require_graphql_authorizations(:read_instance_metadata) }
+ it { expect(described_class).to require_graphql_authorizations(:read_instance_metadata) }
end
diff --git a/spec/graphql/types/namespace_type_spec.rb b/spec/graphql/types/namespace_type_spec.rb
index f476dd7286f..6c2ba70cf4c 100644
--- a/spec/graphql/types/namespace_type_spec.rb
+++ b/spec/graphql/types/namespace_type_spec.rb
@@ -11,8 +11,8 @@ describe GitlabSchema.types['Namespace'] do
lfs_enabled request_access_enabled projects root_storage_statistics
]
- is_expected.to have_graphql_fields(*expected_fields)
+ expect(described_class).to have_graphql_fields(*expected_fields)
end
- it { is_expected.to require_graphql_authorizations(:read_namespace) }
+ it { expect(described_class).to require_graphql_authorizations(:read_namespace) }
end
diff --git a/spec/graphql/types/notes/diff_position_type_spec.rb b/spec/graphql/types/notes/diff_position_type_spec.rb
index aa08daaacd4..01f355cb278 100644
--- a/spec/graphql/types/notes/diff_position_type_spec.rb
+++ b/spec/graphql/types/notes/diff_position_type_spec.rb
@@ -7,6 +7,6 @@ describe GitlabSchema.types['DiffPosition'] do
:new_path, :position_type, :old_line, :new_line, :x, :y,
:width, :height]
- is_expected.to have_graphql_fields(*expected_fields)
+ expect(described_class).to have_graphql_fields(*expected_fields)
end
end
diff --git a/spec/graphql/types/notes/discussion_type_spec.rb b/spec/graphql/types/notes/discussion_type_spec.rb
index ba7fc961212..804785ba67d 100644
--- a/spec/graphql/types/notes/discussion_type_spec.rb
+++ b/spec/graphql/types/notes/discussion_type_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
describe GitlabSchema.types['Discussion'] do
- it { is_expected.to have_graphql_fields(:id, :created_at, :notes, :reply_id) }
+ it { expect(described_class).to have_graphql_fields(:id, :created_at, :notes, :reply_id) }
- it { is_expected.to require_graphql_authorizations(:read_note) }
+ it { expect(described_class).to require_graphql_authorizations(:read_note) }
end
diff --git a/spec/graphql/types/notes/note_type_spec.rb b/spec/graphql/types/notes/note_type_spec.rb
index e8a58da4b17..809f54c120c 100644
--- a/spec/graphql/types/notes/note_type_spec.rb
+++ b/spec/graphql/types/notes/note_type_spec.rb
@@ -7,9 +7,9 @@ describe GitlabSchema.types['Note'] do
:updated_at, :discussion, :resolvable, :position, :user_permissions,
:resolved_by, :resolved_at, :system, :body_html]
- is_expected.to have_graphql_fields(*expected_fields)
+ expect(described_class).to have_graphql_fields(*expected_fields)
end
- it { is_expected.to expose_permissions_using(Types::PermissionTypes::Note) }
- it { is_expected.to require_graphql_authorizations(:read_note) }
+ it { expect(described_class).to expose_permissions_using(Types::PermissionTypes::Note) }
+ it { expect(described_class).to require_graphql_authorizations(:read_note) }
end
diff --git a/spec/graphql/types/notes/noteable_type_spec.rb b/spec/graphql/types/notes/noteable_type_spec.rb
index d10c79b5344..a4259e160e0 100644
--- a/spec/graphql/types/notes/noteable_type_spec.rb
+++ b/spec/graphql/types/notes/noteable_type_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
describe Types::Notes::NoteableType do
- it { is_expected.to have_graphql_fields(:notes, :discussions) }
+ it { expect(described_class).to have_graphql_fields(:notes, :discussions) }
describe ".resolve_type" do
it 'knows the correct type for objects' do
diff --git a/spec/graphql/types/permission_types/base_permission_type_spec.rb b/spec/graphql/types/permission_types/base_permission_type_spec.rb
index aa6b4320006..4c6d5fd369a 100644
--- a/spec/graphql/types/permission_types/base_permission_type_spec.rb
+++ b/spec/graphql/types/permission_types/base_permission_type_spec.rb
@@ -19,13 +19,13 @@ describe Types::PermissionTypes::BasePermissionType do
describe '.permission_field' do
it 'adds a field for the required permission' do
- is_expected.to have_graphql_field(:do_stuff)
+ expect(test_type).to have_graphql_field(:do_stuff)
end
end
describe '.ability_field' do
it 'adds a field for the required permission' do
- is_expected.to have_graphql_field(:read_issue)
+ expect(test_type).to have_graphql_field(:read_issue)
end
it 'does not add a resolver block if another resolving param is passed' do
@@ -44,7 +44,7 @@ describe Types::PermissionTypes::BasePermissionType do
describe '.abilities' do
it 'adds a field for the passed permissions' do
- is_expected.to have_graphql_field(:admin_issue)
+ expect(test_type).to have_graphql_field(:admin_issue)
end
end
end
diff --git a/spec/graphql/types/permission_types/note_spec.rb b/spec/graphql/types/permission_types/note_spec.rb
index a7811fc20e5..a2becb6892b 100644
--- a/spec/graphql/types/permission_types/note_spec.rb
+++ b/spec/graphql/types/permission_types/note_spec.rb
@@ -8,6 +8,6 @@ describe GitlabSchema.types['NotePermissions'] do
:read_note, :create_note, :admin_note, :resolve_note, :award_emoji
]
- is_expected.to have_graphql_fields(expected_permissions)
+ expect(described_class).to have_graphql_fields(expected_permissions)
end
end
diff --git a/spec/graphql/types/project_statistics_type_spec.rb b/spec/graphql/types/project_statistics_type_spec.rb
index e9feac57a36..fbea780494b 100644
--- a/spec/graphql/types/project_statistics_type_spec.rb
+++ b/spec/graphql/types/project_statistics_type_spec.rb
@@ -4,7 +4,7 @@ require 'spec_helper'
describe GitlabSchema.types['ProjectStatistics'] do
it "has all the required fields" do
- is_expected.to have_graphql_fields(:storage_size, :repository_size, :lfs_objects_size,
+ expect(described_class).to have_graphql_fields(:storage_size, :repository_size, :lfs_objects_size,
:build_artifacts_size, :packages_size, :commit_count,
:wiki_size)
end
diff --git a/spec/graphql/types/project_type_spec.rb b/spec/graphql/types/project_type_spec.rb
index 9c6d1e3f35c..475ae9ff5f6 100644
--- a/spec/graphql/types/project_type_spec.rb
+++ b/spec/graphql/types/project_type_spec.rb
@@ -27,7 +27,7 @@ describe GitlabSchema.types['Project'] do
boards
]
- is_expected.to include_graphql_fields(*expected_fields)
+ expect(described_class).to include_graphql_fields(*expected_fields)
end
describe 'issue field' do
diff --git a/spec/graphql/types/repository_type_spec.rb b/spec/graphql/types/repository_type_spec.rb
index 236f9bb9459..f746e75b574 100644
--- a/spec/graphql/types/repository_type_spec.rb
+++ b/spec/graphql/types/repository_type_spec.rb
@@ -7,7 +7,7 @@ describe GitlabSchema.types['Repository'] do
it { expect(described_class).to require_graphql_authorizations(:download_code) }
- it { is_expected.to have_graphql_field(:root_ref) }
+ it { expect(described_class).to have_graphql_field(:root_ref) }
- it { is_expected.to have_graphql_field(:tree) }
+ it { expect(described_class).to have_graphql_field(:tree) }
end
diff --git a/spec/graphql/types/root_storage_statistics_type_spec.rb b/spec/graphql/types/root_storage_statistics_type_spec.rb
index 8c69c13aa73..b796b974b82 100644
--- a/spec/graphql/types/root_storage_statistics_type_spec.rb
+++ b/spec/graphql/types/root_storage_statistics_type_spec.rb
@@ -6,9 +6,9 @@ describe GitlabSchema.types['RootStorageStatistics'] do
it { expect(described_class.graphql_name).to eq('RootStorageStatistics') }
it 'has all the required fields' do
- is_expected.to have_graphql_fields(:storage_size, :repository_size, :lfs_objects_size,
+ expect(described_class).to have_graphql_fields(:storage_size, :repository_size, :lfs_objects_size,
:build_artifacts_size, :packages_size, :wiki_size)
end
- it { is_expected.to require_graphql_authorizations(:read_statistics) }
+ it { expect(described_class).to require_graphql_authorizations(:read_statistics) }
end
diff --git a/spec/graphql/types/snippet_type_spec.rb b/spec/graphql/types/snippet_type_spec.rb
index 97573f8c46b..afac480d06b 100644
--- a/spec/graphql/types/snippet_type_spec.rb
+++ b/spec/graphql/types/snippet_type_spec.rb
@@ -10,7 +10,7 @@ describe GitlabSchema.types['Snippet'] do
:web_url, :raw_url, :notes, :discussions,
:user_permissions, :description_html, :blob]
- is_expected.to have_graphql_fields(*expected_fields)
+ expect(described_class).to have_graphql_fields(*expected_fields)
end
describe 'authorizations' do
diff --git a/spec/graphql/types/snippets/blob_type_spec.rb b/spec/graphql/types/snippets/blob_type_spec.rb
index b6253e96d60..da36ab80f44 100644
--- a/spec/graphql/types/snippets/blob_type_spec.rb
+++ b/spec/graphql/types/snippets/blob_type_spec.rb
@@ -8,6 +8,6 @@ describe GitlabSchema.types['SnippetBlob'] do
:raw_path, :size, :binary, :name, :path,
:simple_viewer, :rich_viewer, :mode]
- is_expected.to have_graphql_fields(*expected_fields)
+ expect(described_class).to have_graphql_fields(*expected_fields)
end
end
diff --git a/spec/graphql/types/snippets/blob_viewer_type_spec.rb b/spec/graphql/types/snippets/blob_viewer_type_spec.rb
index f1f7608cb69..a51d09813ab 100644
--- a/spec/graphql/types/snippets/blob_viewer_type_spec.rb
+++ b/spec/graphql/types/snippets/blob_viewer_type_spec.rb
@@ -7,6 +7,6 @@ describe GitlabSchema.types['SnippetBlobViewer'] do
expected_fields = [:type, :load_async, :too_large, :collapsed,
:render_error, :file_type, :loading_partial_name]
- is_expected.to have_graphql_fields(*expected_fields)
+ expect(described_class).to have_graphql_fields(*expected_fields)
end
end
diff --git a/spec/graphql/types/todo_type_spec.rb b/spec/graphql/types/todo_type_spec.rb
index a5ea5bcffb0..59118259d09 100644
--- a/spec/graphql/types/todo_type_spec.rb
+++ b/spec/graphql/types/todo_type_spec.rb
@@ -6,7 +6,7 @@ describe GitlabSchema.types['Todo'] do
it 'has the correct fields' do
expected_fields = [:id, :project, :group, :author, :action, :target_type, :body, :state, :created_at]
- is_expected.to have_graphql_fields(*expected_fields)
+ expect(described_class).to have_graphql_fields(*expected_fields)
end
it { expect(described_class).to require_graphql_authorizations(:read_todo) }
diff --git a/spec/graphql/types/user_type_spec.rb b/spec/graphql/types/user_type_spec.rb
index b9174b9a90b..8c76ce43e95 100644
--- a/spec/graphql/types/user_type_spec.rb
+++ b/spec/graphql/types/user_type_spec.rb
@@ -12,7 +12,7 @@ describe GitlabSchema.types['User'] do
user_permissions snippets name username avatarUrl webUrl todos
]
- is_expected.to have_graphql_fields(*expected_fields)
+ expect(described_class).to have_graphql_fields(*expected_fields)
end
describe 'snippets field' do