summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-08-31 16:58:13 +0100
committerFilipa Lacerda <filipa@gitlab.com>2018-08-31 16:59:23 +0100
commitecefe090460687a078e3d1aacf621fd5bff07fb5 (patch)
treecc60b6d66838da18474144556673be1175f7a51d /spec
parent472f2d566633df6c1dee1f703b06958b9a0a2cd8 (diff)
downloadgitlab-ce-ecefe090460687a078e3d1aacf621fd5bff07fb5.tar.gz
Render link to branch only when branch still exists
Diffstat (limited to 'spec')
-rw-r--r--spec/features/projects/pipelines/pipeline_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/features/projects/pipelines/pipeline_spec.rb b/spec/features/projects/pipelines/pipeline_spec.rb
index 603503a531c..4d659cb988e 100644
--- a/spec/features/projects/pipelines/pipeline_spec.rb
+++ b/spec/features/projects/pipelines/pipeline_spec.rb
@@ -63,6 +63,11 @@ describe 'Pipeline', :js do
expect(page).to have_css('#js-tab-pipeline.active')
end
+ it 'shows link to the pipeline ref' do
+ expect(page).to have_link(pipeline.ref)
+ end
+
+
it_behaves_like 'showing user status' do
let(:user_with_status) { pipeline.user }
@@ -208,6 +213,18 @@ describe 'Pipeline', :js do
it { expect(page).not_to have_content('Cancel running') }
end
end
+
+ context 'with deleted branch' do
+ before do
+ DeleteBranchService.new(@project, @user).execute(pipeline.ref)
+ end
+
+ it 'does not render link to the pipeline ref' do
+ expect(page).not_to have_link(pipeline.ref)
+ expect(page).to have_content(pipeline.ref)
+ end
+ end
+
end
context 'when user does not have access to read jobs' do