Commit f1dea8ae authored by Francisco Javier López's avatar Francisco Javier López Committed by Denys Mishunov

Apply 2 suggestion(s) to 2 file(s)

parent 9c8e4e9c
......@@ -86,8 +86,7 @@ module Sidebars
override :container_html_options
def container_html_options
super.tap do |html_options|
# Flagging menus that can be rendered but without any children
# like the merge requests or the requirements menu
# Flagging menus that can be rendered and with renderable menu items
if render? && has_renderable_items?
html_options[:class] = [*html_options[:class], 'has-sub-items'].join(' ')
end
......
......@@ -191,7 +191,7 @@ RSpec.describe Sidebars::Menu do
allow(menu).to receive(:render?).and_return(false)
end
it 'does not contain "has-sub-items" class' do
it 'does not contain special class' do
expect(menu.container_html_options[:class]).to be_nil
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment