diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-19 15:09:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-19 15:09:29 +0300 |
commit | 3ca9a972f6bc4060a58703398df74d87703916cf (patch) | |
tree | 4c10ba27bd3e079ad156f030835179a6dd4dafa8 /spec/requests | |
parent | 76e68e67ab3e928d289361ac20558a053a623263 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/api_spec.rb | 2 | ||||
-rw-r--r-- | spec/requests/api/broadcast_messages_spec.rb | 2 | ||||
-rw-r--r-- | spec/requests/api/graphql/project/merge_requests_spec.rb | 12 |
3 files changed, 14 insertions, 2 deletions
diff --git a/spec/requests/api/api_spec.rb b/spec/requests/api/api_spec.rb index 01bb8101f76..1d1d66ad125 100644 --- a/spec/requests/api/api_spec.rb +++ b/spec/requests/api/api_spec.rb @@ -229,7 +229,7 @@ RSpec.describe API::API, feature_category: :system_access do expect(data.stringify_keys).not_to include('meta.project', 'meta.root_namespace', 'meta.user') end - expect(BroadcastMessage).to receive(:all).and_raise('An error!') + expect(System::BroadcastMessage).to receive(:all).and_raise('An error!') get(api('/broadcast_messages')) diff --git a/spec/requests/api/broadcast_messages_spec.rb b/spec/requests/api/broadcast_messages_spec.rb index 530c81364a8..d063f290e8d 100644 --- a/spec/requests/api/broadcast_messages_spec.rb +++ b/spec/requests/api/broadcast_messages_spec.rb @@ -246,7 +246,7 @@ RSpec.describe API::BroadcastMessages, :aggregate_failures, feature_category: :o delete api(path, admin, admin_mode: true) expect(response).to have_gitlab_http_status(:no_content) - end.to change { BroadcastMessage.count }.by(-1) + end.to change { System::BroadcastMessage.count }.by(-1) end end end diff --git a/spec/requests/api/graphql/project/merge_requests_spec.rb b/spec/requests/api/graphql/project/merge_requests_spec.rb index e3c4396e7d8..3ad98ee09aa 100644 --- a/spec/requests/api/graphql/project/merge_requests_spec.rb +++ b/spec/requests/api/graphql/project/merge_requests_spec.rb @@ -396,6 +396,18 @@ RSpec.describe 'getting merge request listings nested in a project', feature_cat include_examples 'N+1 query check', skip_cached: false end + + context 'when requesting diffStats' do + let(:requested_fields) { ['diffStats { path }'] } + + before do + create_list(:merge_request_diff, 2, merge_request: merge_request_a) + create_list(:merge_request_diff, 2, merge_request: merge_request_b) + create_list(:merge_request_diff, 2, merge_request: merge_request_c) + end + + include_examples 'N+1 query check', skip_cached: false + end end describe 'performance' do |