2021-11-18 22:05:49 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2023-05-27 22:25:52 +05:30
|
|
|
RSpec.describe Sidebars::Groups::Menus::ScopeMenu, feature_category: :navigation do
|
2021-11-18 22:05:49 +05:30
|
|
|
let(:group) { build(:group) }
|
|
|
|
let(:user) { group.owner }
|
|
|
|
let(:context) { Sidebars::Groups::Context.new(current_user: user, container: group) }
|
2023-05-27 22:25:52 +05:30
|
|
|
let(:menu) { described_class.new(context) }
|
2021-11-18 22:05:49 +05:30
|
|
|
|
|
|
|
describe '#extra_nav_link_html_options' do
|
2023-05-27 22:25:52 +05:30
|
|
|
subject { menu.extra_nav_link_html_options }
|
2021-11-18 22:05:49 +05:30
|
|
|
|
|
|
|
specify { is_expected.to match(hash_including(class: 'context-header has-tooltip', title: context.group.name)) }
|
|
|
|
end
|
2023-05-27 22:25:52 +05:30
|
|
|
|
|
|
|
it_behaves_like 'serializable as super_sidebar_menu_args' do
|
|
|
|
let(:extra_attrs) do
|
|
|
|
{
|
|
|
|
sprite_icon: 'group',
|
|
|
|
super_sidebar_parent: ::Sidebars::StaticMenu,
|
|
|
|
title: _('Group overview'),
|
|
|
|
item_id: :group_overview
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
2021-11-18 22:05:49 +05:30
|
|
|
end
|