diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-09 03:08:41 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-09 03:08:41 +0300 |
commit | c02e2a5ef6b928da420e844b54fc6bbce16754c8 (patch) | |
tree | 1f738c4c0c7fc04a3235e8bad807972a740611f2 /spec/views/layouts | |
parent | b0980f5557a8621fb08785b06be950ee46796c18 (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 | 26 |
1 files changed, 25 insertions, 1 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 bf5b5785b8d..3dda971ae0e 100644 --- a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb +++ b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe 'layouts/nav/sidebar/_project' do - let(:project) { create(:project, :repository) } + let_it_be_with_reload(:project) { create(:project, :repository) } before do assign(:project, project) @@ -246,6 +246,30 @@ RSpec.describe 'layouts/nav/sidebar/_project' do end end + describe 'Tracing' do + it 'is not visible to unauthorized user' do + allow(view).to receive(:can?).and_return(false) + + render + + expect(rendered).not_to have_text 'Tracing' + end + + it 'links to Tracing page' do + render + + expect(rendered).to have_link('Tracing', href: project_tracing_path(project)) + end + + context 'without project.tracing_external_url' do + it 'links to Tracing page' do + render + + expect(rendered).to have_link('Tracing', href: project_tracing_path(project)) + end + end + end + describe 'Alert Management' do it 'shows the Alerts sidebar entry' do render |