diff options
| author | Lin Jen-Shin <godfat@godfat.org> | 2016-07-14 17:35:54 +0800 |
|---|---|---|
| committer | Lin Jen-Shin <godfat@godfat.org> | 2016-07-14 17:35:54 +0800 |
| commit | a9a8ceebcbe25cbe27bebe9fc63ab364b1dd41ee (patch) | |
| tree | 71d345108d39cb5ee5ad649062a3613f1712afa9 /spec/features | |
| parent | d7bbee7593ee54a9685c9eded00b121cca3913be (diff) | |
| download | gitlab-ce-a9a8ceebcbe25cbe27bebe9fc63ab364b1dd41ee.tar.gz | |
Merge features/projects/artifacts_spec.rb back
It doesn't make too much sense having this standalone
Diffstat (limited to 'spec/features')
| -rw-r--r-- | spec/features/projects/artifacts_spec.rb | 37 | ||||
| -rw-r--r-- | spec/features/projects/builds_spec.rb | 17 |
2 files changed, 17 insertions, 37 deletions
diff --git a/spec/features/projects/artifacts_spec.rb b/spec/features/projects/artifacts_spec.rb deleted file mode 100644 index f5356a8b701..00000000000 --- a/spec/features/projects/artifacts_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -require 'spec_helper' - -describe 'Artifacts' do - let(:artifacts_file) { fixture_file_upload(Rails.root + 'spec/fixtures/banana_sample.gif', 'image/gif') } - let(:pipeline) { create(:ci_pipeline) } - let(:build) { create(:ci_build, pipeline: pipeline) } - let(:build2) { create(:ci_build) } - let(:project) { pipeline.project } - - before do - login_as(:user) - project.team << [@user, :developer] - end - - describe 'GET /:project/builds/:id/artifacts/download' do - before do - build.update_attributes(artifacts_file: artifacts_file) - - visit namespace_project_build_path(project.namespace, project, build) - - click_link 'Download' - end - - context 'Build from other project' do - before do - build2.update_attributes(artifacts_file: artifacts_file) - - visit download_namespace_project_build_artifacts_path( - project.namespace, - project, - build2) - end - - it { expect(page.status_code).to eq(404) } - end - end -end diff --git a/spec/features/projects/builds_spec.rb b/spec/features/projects/builds_spec.rb index 25689f1c6e8..16832c297ac 100644 --- a/spec/features/projects/builds_spec.rb +++ b/spec/features/projects/builds_spec.rb @@ -196,6 +196,23 @@ describe "Builds" do end end + describe "GET /:project/builds/:id/download" do + before do + @build.update_attributes(artifacts_file: artifacts_file) + visit namespace_project_build_path(@project.namespace, @project, @build) + click_link 'Download' + end + + context "Build from other project" do + before do + @build2.update_attributes(artifacts_file: artifacts_file) + visit download_namespace_project_build_artifacts_path(@project.namespace, @project, @build2) + end + + it { expect(page.status_code).to eq(404) } + end + end + describe "GET /:project/builds/:id/raw" do context "Build from project" do before do |
