diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2017-10-03 14:25:41 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2017-10-03 14:25:41 +0300 |
commit | 6a40c21675848ae9ef9afd28b1eabc241994a6f4 (patch) | |
tree | 473f2cc1d5453e8aa8660276c0d28f2b92ec3e75 /spec/features/projects/artifacts | |
parent | dfd9185da10314cdb57081b93a9245b6a8637198 (diff) |
Update tests for new implementation
Diffstat (limited to 'spec/features/projects/artifacts')
-rw-r--r-- | spec/features/projects/artifacts/browse_spec.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/spec/features/projects/artifacts/browse_spec.rb b/spec/features/projects/artifacts/browse_spec.rb index 40af0247bce..1bfdf3c2727 100644 --- a/spec/features/projects/artifacts/browse_spec.rb +++ b/spec/features/projects/artifacts/browse_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' feature 'Browse artifact', :js do - include ArtifactHelper - let(:project) { create(:project, :public) } let(:pipeline) { create(:ci_empty_pipeline, project: project) } let(:job) { create(:ci_build, :artifacts, pipeline: pipeline) } @@ -24,8 +22,8 @@ feature 'Browse artifact', :js do end end - context 'when browsing a directory with an HTML file' do - let(:html_entry) { job.artifacts_metadata_entry("other_artifacts_0.1.2/index.html") } + context 'when browsing a directory with an text file' do + let(:txt_entry) { job.artifacts_metadata_entry('other_artifacts_0.1.2/doc_sample.txt') } before do allow(Gitlab.config.pages).to receive(:enabled).and_return(true) @@ -37,8 +35,7 @@ feature 'Browse artifact', :js do it "shows external link icon and styles" do link = first('.tree-item-file-external-link') - expect(link).to have_content('index.html') - expect(link[:href]).to eq(html_artifact_url(project, job, html_entry.blob)) + expect(link).to have_content('doc_sample.txt') expect(page).to have_selector('.js-artifact-tree-external-icon') end end |