diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-29 16:02:17 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-29 16:02:17 +0300 |
commit | 6f10ecdeb6d8636ce7c9fb6cf7930f1a543f58df (patch) | |
tree | 959df42c10bab01d1bc81c87ea1ed8f9d3e4e98f /spec/support | |
parent | 003d8b5eac3aa173a7061b82d84ffaf28e8024f6 (diff) |
Add latest changes from gitlab-org/security/gitlab@14-3-stable-ee
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/shared_examples/controllers/uploads_actions_shared_examples.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/support/shared_examples/controllers/uploads_actions_shared_examples.rb b/spec/support/shared_examples/controllers/uploads_actions_shared_examples.rb index a20c1d78912..62b35923bcd 100644 --- a/spec/support/shared_examples/controllers/uploads_actions_shared_examples.rb +++ b/spec/support/shared_examples/controllers/uploads_actions_shared_examples.rb @@ -323,6 +323,16 @@ RSpec.shared_examples 'handle uploads authorize' do end end + context 'when id is not passed as a param' do + let(:params) { super().without(:id) } + + it 'returns 404 status' do + post_authorize + + expect(response).to have_gitlab_http_status(:not_found) + end + end + context 'when a user can upload a file' do before do sign_in(user) |