summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-07-20 20:09:29 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-07-20 20:09:29 +0800
commita9f3f3c8c9a1656efae35b9837ab4076cc236bf1 (patch)
tree796abfe2bff7866d465a6d7e9ef3a5eafaf39fc5
parent145da6b1c1794d8e7191e99edc71269130cbfbb9 (diff)
downloadgitlab-ce-a9f3f3c8c9a1656efae35b9837ab4076cc236bf1.tar.gz
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.
-rw-r--r--spec/requests/api/builds_spec.rb16
1 files changed, 6 insertions, 10 deletions
diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb
index e623eed7e9e..d14fd53afb9 100644
--- a/spec/requests/api/builds_spec.rb
+++ b/spec/requests/api/builds_spec.rb
@@ -213,17 +213,13 @@ describe API::API, api: true do
end
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
+ 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.headers).to include(download_headers) }
end