Cleanup let a bit, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347#note_13195683 and https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347#note_13195692 another_artifacts was no longer used and then there's no point to put let in outer scope anymore.
This commit is contained in:
parent
145da6b1c1
commit
a9f3f3c8c9
1 changed files with 6 additions and 10 deletions
|
@ -213,17 +213,13 @@ describe API::API, api: true do
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'find proper build' do
|
context 'find proper build' do
|
||||||
let(:another_artifacts) do
|
|
||||||
fixture_file_upload(Rails.root + 'spec/fixtures/dk.png', 'image/gif')
|
|
||||||
end
|
|
||||||
|
|
||||||
let(:download_headers) do
|
|
||||||
{ 'Content-Transfer-Encoding' => 'binary',
|
|
||||||
'Content-Disposition' =>
|
|
||||||
"attachment; filename=#{build.artifacts_file.filename}" }
|
|
||||||
end
|
|
||||||
|
|
||||||
shared_examples 'a valid file' do
|
shared_examples 'a valid file' do
|
||||||
|
let(:download_headers) do
|
||||||
|
{ 'Content-Transfer-Encoding' => 'binary',
|
||||||
|
'Content-Disposition' =>
|
||||||
|
"attachment; filename=#{build.artifacts_file.filename}" }
|
||||||
|
end
|
||||||
|
|
||||||
it { expect(response).to have_http_status(200) }
|
it { expect(response).to have_http_status(200) }
|
||||||
it { expect(response.headers).to include(download_headers) }
|
it { expect(response.headers).to include(download_headers) }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue