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:
authorNick Thomas <nick@gitlab.com>2017-10-21 01:38:15 +0300
committerNick Thomas <nick@gitlab.com>2017-10-21 01:38:35 +0300
commit3c0be3cd41a72925678df457b040a559a4ba01ee (patch)
tree585d0b83b1fba262074a4baf5bee9172c8d94647 /spec/models/ci
parente1122c9f6daff16b900a0837d25789e1e5bdc56c (diff)
Fix the external URLs generated for online view of HTML artifacts
Diffstat (limited to 'spec/models/ci')
-rw-r--r--spec/models/ci/artifact_blob_spec.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/models/ci/artifact_blob_spec.rb b/spec/models/ci/artifact_blob_spec.rb
index d5ba088af53..4e72d9d748e 100644
--- a/spec/models/ci/artifact_blob_spec.rb
+++ b/spec/models/ci/artifact_blob_spec.rb
@@ -56,15 +56,14 @@ describe Ci::ArtifactBlob do
end
context 'txt extensions' do
- let(:entry) { build.artifacts_metadata_entry('other_artifacts_0.1.2/doc_sample.txt') }
+ let(:path) { 'other_artifacts_0.1.2/doc_sample.txt' }
+ let(:entry) { build.artifacts_metadata_entry(path) }
it 'returns a URL' do
url = subject.external_url(build.project, build)
expect(url).not_to be_nil
- expect(url).to start_with("http")
- expect(url).to match Gitlab.config.pages.host
- expect(url).to end_with(entry.path)
+ expect(url).to eq("http://#{project.namespace.path}.#{Gitlab.config.pages.host}/-/#{project.path}/-/jobs/#{build.id}/artifacts/#{path}")
end
end
end