diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-29 18:08:47 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-29 18:08:47 +0000 |
commit | 6b9d3a4e8351e662c4586b24bb152de78ae9e3bf (patch) | |
tree | 883e9db60c047c54418fc1d2b1c5517f97e0f185 /spec/controllers/projects/artifacts_controller_spec.rb | |
parent | 23288f62da73fb0e30d8e7ce306665e8fda1b932 (diff) | |
download | gitlab-ce-6b9d3a4e8351e662c4586b24bb152de78ae9e3bf.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/projects/artifacts_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/artifacts_controller_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/controllers/projects/artifacts_controller_spec.rb b/spec/controllers/projects/artifacts_controller_spec.rb index 7aaaa363faa..c59983d5138 100644 --- a/spec/controllers/projects/artifacts_controller_spec.rb +++ b/spec/controllers/projects/artifacts_controller_spec.rb @@ -138,14 +138,14 @@ describe Projects::ArtifactsController do let(:filename) { job.artifacts_file.filename } it 'sends the artifacts file' do - # Notice the filename= is omitted from the disposition; this is because - # Rails 5 will append this header in send_file expect(controller).to receive(:send_file) .with( job.artifacts_file.file.path, - hash_including(disposition: %Q(attachment; filename*=UTF-8''#{filename}))).and_call_original + hash_including(disposition: 'attachment', filename: filename)).and_call_original download_artifact + + expect(response.headers['Content-Disposition']).to eq(%Q(attachment; filename="#{filename}"; filename*=UTF-8''#{filename})) end end @@ -170,13 +170,13 @@ describe Projects::ArtifactsController do end it 'sends the codequality report' do - # Notice the filename= is omitted from the disposition; this is because - # Rails 5 will append this header in send_file expect(controller).to receive(:send_file) .with(job.job_artifacts_codequality.file.path, - hash_including(disposition: %Q(attachment; filename*=UTF-8''#{filename}))).and_call_original + hash_including(disposition: 'attachment', filename: filename)).and_call_original download_artifact(file_type: file_type) + + expect(response.headers['Content-Disposition']).to eq(%Q(attachment; filename="#{filename}"; filename*=UTF-8''#{filename})) end end |