diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-12-05 14:31:33 +0000 |
---|---|---|
committer | Kamil TrzciĆski <ayufan@ayufan.eu> | 2018-02-28 20:44:09 +0100 |
commit | 6ca02a41500790b3e9061dd8836540955b9aaf7c (patch) | |
tree | 5c66c4826cafa2657fe25d85eb9e189b5f290f32 /spec/requests/api/v3 | |
parent | ec72abf53fd82ca3e7f126536a83b27b368696ec (diff) | |
download | gitlab-ce-6ca02a41500790b3e9061dd8836540955b9aaf7c.tar.gz |
Merge branch 'zj-multiple-artifacts-ee' into 'master'
Multiple artifacts ee
See merge request gitlab-org/gitlab-ee!3276
Diffstat (limited to 'spec/requests/api/v3')
-rw-r--r-- | spec/requests/api/v3/builds_spec.rb | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/spec/requests/api/v3/builds_spec.rb b/spec/requests/api/v3/builds_spec.rb index 266ae654227..862bf7e540d 100644 --- a/spec/requests/api/v3/builds_spec.rb +++ b/spec/requests/api/v3/builds_spec.rb @@ -215,10 +215,13 @@ describe API::V3::Builds do end context 'when artifacts are stored remotely' do - let(:build) { create(:ci_build, :artifacts, :remote_store, pipeline: pipeline) } + let(:build) { create(:ci_build, pipeline: pipeline) } + let!(:artifact) { create(:ci_job_artifact, :archive, :remote_store, job: build) } it 'returns location redirect' do - expect(response).to have_http_status(302) + get v3_api("/projects/#{project.id}/builds/#{build.id}/artifacts", api_user) + + expect(response).to have_gitlab_http_status(302) end end @@ -309,7 +312,14 @@ describe API::V3::Builds do end context 'when artifacts are stored remotely' do - let(:build) { create(:ci_build, :artifacts, :remote_store, pipeline: pipeline) } + let(:build) { create(:ci_build, pipeline: pipeline) } + let!(:artifact) { create(:ci_job_artifact, :archive, :remote_store, job: build) } + + before do + build.reload + + get v3_api("/projects/#{project.id}/builds/#{build.id}/artifacts", api_user) + end it 'returns location redirect' do expect(response).to have_http_status(302) |