summaryrefslogtreecommitdiff
path: root/spec/requests
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-08-11 22:54:25 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-08-11 22:54:25 +0200
commit4ccf39cde7356bf98bef5aae694257fb2c001e75 (patch)
treee5acf2ae15a7223eeb45811ded8446dcd9d57c64 /spec/requests
parent6a6a69f4afbe0107a75df018b662f02b5ec0166a (diff)
downloadgitlab-ce-4ccf39cde7356bf98bef5aae694257fb2c001e75.tar.gz
Fix test failures, that did occur because of missing previously used `reload_status!` call
Diffstat (limited to 'spec/requests')
-rw-r--r--spec/requests/api/builds_spec.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb
index 966d302dfd3..41503885dd9 100644
--- a/spec/requests/api/builds_spec.rb
+++ b/spec/requests/api/builds_spec.rb
@@ -9,7 +9,7 @@ describe API::API, api: true do
let!(:developer) { create(:project_member, :developer, user: user, project: project) }
let(:reporter) { create(:project_member, :reporter, project: project) }
let(:guest) { create(:project_member, :guest, project: project) }
- let!(:pipeline) { create(:ci_pipeline, project: project, sha: project.commit.id, ref: project.default_branch) }
+ let!(:pipeline) { create(:ci_empty_pipeline, project: project, sha: project.commit.id, ref: project.default_branch) }
let!(:build) { create(:ci_build, pipeline: pipeline) }
describe 'GET /projects/:id/builds ' do
@@ -174,7 +174,11 @@ describe API::API, api: true do
describe 'GET /projects/:id/artifacts/:ref_name/download?job=name' do
let(:api_user) { reporter.user }
- let(:build) { create(:ci_build, :success, :artifacts, pipeline: pipeline) }
+ let(:build) { create(:ci_build, :artifacts, pipeline: pipeline) }
+
+ before do
+ build.success
+ end
def path_for_ref(ref = pipeline.ref, job = build.name)
api("/projects/#{project.id}/builds/artifacts/#{ref}/download?job=#{job}", api_user)