diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-22 21:44:12 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-22 21:44:12 +0300 |
commit | 34d6370bacdf1849de3618f23faaa9de76612e31 (patch) | |
tree | 1420e018fea4068504d059141212502e6f9ac040 /spec/requests | |
parent | 727b75d3e8ecb88c70edbb017f29a8da302656c0 (diff) |
Add latest changes from gitlab-org/security/gitlab@16-0-stable-eev16.0.1
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/groups/uploads_controller_spec.rb | 14 | ||||
-rw-r--r-- | spec/requests/projects/uploads_controller_spec.rb | 14 | ||||
-rw-r--r-- | spec/requests/uploads_controller_spec.rb | 17 |
3 files changed, 45 insertions, 0 deletions
diff --git a/spec/requests/groups/uploads_controller_spec.rb b/spec/requests/groups/uploads_controller_spec.rb new file mode 100644 index 00000000000..8a9e3edbe20 --- /dev/null +++ b/spec/requests/groups/uploads_controller_spec.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Groups::UploadsController, feature_category: :shared do + include WorkhorseHelpers + + it_behaves_like 'uploads actions' do + let_it_be(:model) { create(:group, :public) } + let_it_be(:upload) { create(:upload, :namespace_upload, :with_file, model: model) } + + let(:show_path) { show_group_uploads_path(model, upload.secret, File.basename(upload.path)) } + end +end diff --git a/spec/requests/projects/uploads_controller_spec.rb b/spec/requests/projects/uploads_controller_spec.rb new file mode 100644 index 00000000000..03b53143c84 --- /dev/null +++ b/spec/requests/projects/uploads_controller_spec.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Projects::UploadsController, feature_category: :shared do + include WorkhorseHelpers + + it_behaves_like 'uploads actions' do + let_it_be(:model) { create(:project, :public) } + let_it_be(:upload) { create(:upload, :issuable_upload, :with_file, model: model) } + + let(:show_path) { show_project_uploads_path(model, upload.secret, File.basename(upload.path)) } + end +end diff --git a/spec/requests/uploads_controller_spec.rb b/spec/requests/uploads_controller_spec.rb new file mode 100644 index 00000000000..1e6999982a8 --- /dev/null +++ b/spec/requests/uploads_controller_spec.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe UploadsController, feature_category: :shared do + include WorkhorseHelpers + + it_behaves_like 'uploads actions' do + let_it_be(:model) { create(:personal_snippet, :public) } + let_it_be(:upload) { create(:upload, :personal_snippet_upload, :with_file, model: model) } + + # See config/routes/uploads.rb + let(:show_path) do + "/uploads/-/system/#{model.model_name.singular}/#{model.to_param}/#{upload.secret}/#{File.basename(upload.path)}" + end + end +end |