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
path: root/spec/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-07-27 15:10:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-07-27 15:10:33 +0300
commitfdf32113c3924f7faec91101282fc28ec42fc869 (patch)
tree388fdb9982d5ae80c8bc9b9bdcc0dde98cd6ead9 /spec/lib
parent5add82515889cf332b65bbf59394079222dc66b3 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/sidebars/menu_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/lib/sidebars/menu_spec.rb b/spec/lib/sidebars/menu_spec.rb
index 4f77cb3aed4..00202ac7d2b 100644
--- a/spec/lib/sidebars/menu_spec.rb
+++ b/spec/lib/sidebars/menu_spec.rb
@@ -302,6 +302,19 @@ RSpec.describe Sidebars::Menu, feature_category: :navigation do
end
end
+ describe "#remove_item" do
+ let(:item) { Sidebars::MenuItem.new(title: 'foo1', link: 'foo1', active_routes: {}, item_id: :foo1) }
+
+ before do
+ menu.add_item(item)
+ end
+
+ it 'removes the item from the menu' do
+ menu.remove_item(item)
+ expect(menu.has_items?).to be false
+ end
+ end
+
describe '#container_html_options' do
before do
allow(menu).to receive(:title).and_return('Foo Menu')