Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-05-18 19:57:37 +0300
committerLin Jen-Shin <godfat@godfat.org>2017-05-18 19:57:37 +0300
commitfb3077e67b527f92a917e0f8b6f2745a322bce9a (patch)
treee284fd772454ae0820d4202646343ec7ad9053ef /spec/features/projects/artifacts/raw_spec.rb
parentad0a50126cfd02602e942b6bbf012279c98a69c3 (diff)
Complete all legacy builds URL. Tests are added
Diffstat (limited to 'spec/features/projects/artifacts/raw_spec.rb')
-rw-r--r--spec/features/projects/artifacts/raw_spec.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/features/projects/artifacts/raw_spec.rb b/spec/features/projects/artifacts/raw_spec.rb
new file mode 100644
index 00000000000..9c910fe05cd
--- /dev/null
+++ b/spec/features/projects/artifacts/raw_spec.rb
@@ -0,0 +1,25 @@
+require 'spec_helper'
+
+feature 'Raw artifact', :js, feature: true do
+ let(:project) { create(:project, :public) }
+ let(:pipeline) { create(:ci_empty_pipeline, project: project, sha: project.commit.sha, ref: 'master') }
+ let(:job) { create(:ci_build, :artifacts, pipeline: pipeline) }
+
+ def raw_path(path)
+ raw_namespace_project_job_artifacts_path(project.namespace, project, job, path)
+ end
+
+ context 'when visiting old URL' do
+ let(:raw_url) do
+ raw_path('other_artifacts_0.1.2/doc_sample.txt')
+ end
+
+ before do
+ visit raw_url.sub('jobs', 'builds')
+ end
+
+ it "redirects to new URL" do
+ expect(page.current_path).to eq(raw_url)
+ end
+ end
+end