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-04-07 03:08:48 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-07 03:08:48 +0300
commit29e19880e22c31eef2d007647b0c46db8f0e7a04 (patch)
tree027c642958a2bec4983d0e6eed8690df57dfeeb6 /spec/lib/sidebars
parent02c6800ac51fc1a504f527426d6cc5a780481a1d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/sidebars')
-rw-r--r--spec/lib/sidebars/projects/panel_spec.rb36
1 files changed, 30 insertions, 6 deletions
diff --git a/spec/lib/sidebars/projects/panel_spec.rb b/spec/lib/sidebars/projects/panel_spec.rb
index 7e69a2dfe52..ff253eedd08 100644
--- a/spec/lib/sidebars/projects/panel_spec.rb
+++ b/spec/lib/sidebars/projects/panel_spec.rb
@@ -17,16 +17,40 @@ RSpec.describe Sidebars::Projects::Panel do
subject { described_class.new(context).instance_variable_get(:@menus) }
context 'when integration is present and active' do
- let_it_be(:confluence) { create(:confluence_integration, active: true) }
+ context 'confluence only' do
+ let_it_be(:confluence) { create(:confluence_integration, active: true) }
- let(:project) { confluence.project }
+ let(:project) { confluence.project }
- it 'contains Confluence menu item' do
- expect(subject.index { |i| i.is_a?(Sidebars::Projects::Menus::ConfluenceMenu) }).not_to be_nil
+ it 'contains Confluence menu item' do
+ expect(subject.index { |i| i.is_a?(Sidebars::Projects::Menus::ConfluenceMenu) }).not_to be_nil
+ end
+
+ it 'does not contain Wiki menu item' do
+ expect(subject.index { |i| i.is_a?(Sidebars::Projects::Menus::WikiMenu) }).to be_nil
+ end
end
- it 'does not contain Wiki menu item' do
- expect(subject.index { |i| i.is_a?(Sidebars::Projects::Menus::WikiMenu) }).to be_nil
+ context 'shimo only' do
+ let_it_be(:shimo) { create(:shimo_integration, active: true) }
+
+ let(:project) { shimo.project }
+
+ it 'contains Shimo menu item' do
+ expect(subject.index { |i| i.is_a?(Sidebars::Projects::Menus::ShimoMenu) }).not_to be_nil
+ end
+ end
+
+ context 'confluence & shimo' do
+ let_it_be(:confluence) { create(:confluence_integration, active: true) }
+ let_it_be(:shimo) { create(:shimo_integration, active: true) }
+
+ let(:project) { confluence.project }
+
+ it 'contains Confluence menu item, not Shimo' do
+ expect(subject.index { |i| i.is_a?(Sidebars::Projects::Menus::ConfluenceMenu) }).not_to be_nil
+ expect(subject.index { |i| i.is_a?(Sidebars::Projects::Menus::ShimoMenu) }).to be_nil
+ end
end
end