diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-16 21:11:53 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-16 21:11:53 +0300 |
commit | 889bf7a0eea1f4ac7c2ec28cdfded399c0ca8fb9 (patch) | |
tree | bc2f4d2b049c6bcf4d57cef67c43599c8a6ec888 /spec/requests/api | |
parent | dad48b4af20204db430a6c62c4641283e24dd89a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests/api')
-rw-r--r-- | spec/requests/api/applications_spec.rb | 8 | ||||
-rw-r--r-- | spec/requests/api/graphql/project/merge_requests_spec.rb | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/spec/requests/api/applications_spec.rb b/spec/requests/api/applications_spec.rb index ca09f5524ca..959e68e6a0d 100644 --- a/spec/requests/api/applications_spec.rb +++ b/spec/requests/api/applications_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' RSpec.describe API::Applications, :api do let(:admin_user) { create(:user, admin: true) } let(:user) { create(:user, admin: false) } - let!(:application) { create(:application, name: 'another_application', redirect_uri: 'http://other_application.url', scopes: '') } + let!(:application) { create(:application, name: 'another_application', owner: nil, redirect_uri: 'http://other_application.url', scopes: '') } describe 'POST /applications' do context 'authenticated and authorized user' do @@ -143,6 +143,12 @@ RSpec.describe API::Applications, :api do expect(response).to have_gitlab_http_status(:no_content) end + + it 'cannot delete non-existing application' do + delete api("/applications/#{non_existing_record_id}", admin_user) + + expect(response).to have_gitlab_http_status(:not_found) + end end context 'authorized user without authorization' do diff --git a/spec/requests/api/graphql/project/merge_requests_spec.rb b/spec/requests/api/graphql/project/merge_requests_spec.rb index d97a0ed9399..e07e2428f33 100644 --- a/spec/requests/api/graphql/project/merge_requests_spec.rb +++ b/spec/requests/api/graphql/project/merge_requests_spec.rb @@ -47,10 +47,10 @@ RSpec.describe 'getting merge request listings nested in a project' do end before do - # We cannot call the whitelist here, since the transaction does not + # We cannot disable SQL query limiting here, since the transaction does not # begin until we enter the controller. headers = { - 'X-GITLAB-QUERY-WHITELIST-ISSUE' => 'https://gitlab.com/gitlab-org/gitlab/-/issues/322979' + 'X-GITLAB-DISABLE-SQL-QUERY-LIMIT' => 'https://gitlab.com/gitlab-org/gitlab/-/issues/322979' } post_graphql(query, current_user: current_user, headers: headers) |