diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-22 00:16:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-22 00:16:35 +0300 |
commit | cbe93b8cd84690d393bf4f0ade940ed5a52667fa (patch) | |
tree | 1d6381a5a46a93e226c8a065680c93d34104dcad /spec/views/layouts | |
parent | 6be1f63eb6ca987f959c18576bb9042b9ee7726b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/views/layouts')
-rw-r--r-- | spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb | 16 |
1 files changed, 13 insertions, 3 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 f7da288b9f3..869defbb331 100644 --- a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb +++ b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb @@ -286,10 +286,20 @@ RSpec.describe 'layouts/nav/sidebar/_project' do end describe 'Pipeline Editor' do - it 'has a link to the pipeline editor' do - render + context 'with a current_ref' do + it 'has a link to the pipeline editor' do + render + + expect(rendered).to have_link('Editor', href: project_ci_pipeline_editor_path(project, params: { branch_name: current_ref })) + end + end + + context 'with the default_branch' do + it 'has a link to the pipeline editor' do + render - expect(rendered).to have_link('Editor', href: project_ci_pipeline_editor_path(project)) + expect(rendered).to have_link('Editor', href: project_ci_pipeline_editor_path(project, params: { branch_name: project.default_branch })) + end end context 'when user cannot access pipeline editor' do |