diff options
Diffstat (limited to 'spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb')
-rw-r--r-- | spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb index 3fb9fb54b01..c5b56b15431 100644 --- a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb +++ b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb @@ -219,6 +219,22 @@ RSpec.describe 'layouts/nav/sidebar/_project' do end end + describe 'pipeline editor link' do + it 'shows the pipeline editor link' do + render + + expect(rendered).to have_link('Editor', href: project_ci_pipeline_editor_path(project)) + end + + it 'does not show the pipeline editor link' do + allow(view).to receive(:can_view_pipeline_editor?).and_return(false) + + render + + expect(rendered).not_to have_link('Editor', href: project_ci_pipeline_editor_path(project)) + end + end + describe 'operations settings tab' do describe 'archive projects' do before do |