diff options
Diffstat (limited to 'spec/models/ci/artifact_blob_spec.rb')
-rw-r--r-- | spec/models/ci/artifact_blob_spec.rb | 7 |
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 |