Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-01-22 00:16:35 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-01-22 00:16:35 +0300
commitcbe93b8cd84690d393bf4f0ade940ed5a52667fa (patch)
tree1d6381a5a46a93e226c8a065680c93d34104dcad /spec/views/layouts
parent6be1f63eb6ca987f959c18576bb9042b9ee7726b (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.rb16
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