summaryrefslogtreecommitdiff
path: root/spec/controllers/projects
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2017-12-05 14:31:33 +0000
committerKamil TrzciƄski <ayufan@ayufan.eu>2018-02-28 20:44:09 +0100
commit6ca02a41500790b3e9061dd8836540955b9aaf7c (patch)
tree5c66c4826cafa2657fe25d85eb9e189b5f290f32 /spec/controllers/projects
parentec72abf53fd82ca3e7f126536a83b27b368696ec (diff)
downloadgitlab-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/controllers/projects')
-rw-r--r--spec/controllers/projects/artifacts_controller_spec.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/spec/controllers/projects/artifacts_controller_spec.rb b/spec/controllers/projects/artifacts_controller_spec.rb
index bc3d277fc8e..581b3e4e4ab 100644
--- a/spec/controllers/projects/artifacts_controller_spec.rb
+++ b/spec/controllers/projects/artifacts_controller_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe Projects::ArtifactsController do
- set(:user) { create(:user) }
+ let(:user) { project.owner }
set(:project) { create(:project, :repository, :public) }
let(:pipeline) do
@@ -15,8 +15,6 @@ describe Projects::ArtifactsController do
let(:job) { create(:ci_build, :success, :artifacts, pipeline: pipeline) }
before do
- project.add_developer(user)
-
sign_in(user)
end
@@ -115,12 +113,12 @@ describe Projects::ArtifactsController do
describe 'GET raw' do
context 'when the file exists' do
let(:path) { 'ci_artifacts.txt' }
- let(:job) { create(:ci_build, :success, :artifacts, pipeline: pipeline, artifacts_file_store: store, artifacts_metadata_store: store) }
shared_examples 'a valid file' do
it 'serves the file using workhorse' do
subject
+ expect(response).to have_gitlab_http_status(200)
expect(send_data).to start_with('artifacts-entry:')
expect(params.keys).to eq(%w(Archive Entry))
@@ -144,8 +142,9 @@ describe Projects::ArtifactsController do
context 'when using local file storage' do
it_behaves_like 'a valid file' do
+ let(:job) { create(:ci_build, :success, :artifacts, pipeline: pipeline) }
let(:store) { ObjectStoreUploader::LOCAL_STORE }
- let(:archive_path) { ArtifactUploader.local_store_path }
+ let(:archive_path) { JobArtifactUploader.local_store_path }
end
end
@@ -157,7 +156,7 @@ describe Projects::ArtifactsController do
it_behaves_like 'a valid file' do
let!(:artifact) { create(:ci_job_artifact, :archive, :remote_store, job: job) }
let!(:job) { create(:ci_build, :success, pipeline: pipeline) }
- let(:store) { ObjectStorage::Store::REMOTE }
+ let(:store) { ObjectStoreUploader::REMOTE_STORE }
let(:archive_path) { 'https://' }
end
end