summaryrefslogtreecommitdiff
path: root/spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb')
-rw-r--r--spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb b/spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb
index 777dc0c8571..2c37565328a 100644
--- a/spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb
+++ b/spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb
@@ -92,7 +92,11 @@ RSpec.describe 'layouts/nav/sidebar/_admin' do
end
context 'on settings' do
+ let(:gitlab_com?) { false }
+
before do
+ allow(::Gitlab).to receive(:com?) { gitlab_com? }
+
render
end
@@ -100,6 +104,20 @@ RSpec.describe 'layouts/nav/sidebar/_admin' do
expect(rendered).to have_link('General', href: general_admin_application_settings_path)
end
+ context 'when GitLab.com' do
+ let(:gitlab_com?) { true }
+
+ it 'does not include Integrations link' do
+ expect(rendered).not_to have_link('Integrations', href: integrations_admin_application_settings_path)
+ end
+ end
+
+ context 'when not GitLab.com' do
+ it 'includes Integrations link' do
+ expect(rendered).to have_link('Integrations', href: integrations_admin_application_settings_path)
+ end
+ end
+
context 'when GitLab FOSS' do
it 'does not include Templates link' do
expect(rendered).not_to have_link('Templates', href: '/admin/application_settings/templates')