diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
commit | 7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0 (patch) | |
tree | 5bdc2229f5198d516781f8d24eace62fc7e589e9 /spec/helpers/groups/group_members_helper_spec.rb | |
parent | 185b095e93520f96e9cfc31d9c3e69b498cdab7c (diff) |
Add latest changes from gitlab-org/gitlab@15-6-stable-eev15.6.0-rc42
Diffstat (limited to 'spec/helpers/groups/group_members_helper_spec.rb')
-rw-r--r-- | spec/helpers/groups/group_members_helper_spec.rb | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/spec/helpers/groups/group_members_helper_spec.rb b/spec/helpers/groups/group_members_helper_spec.rb index 0d53225bbcf..4d1280533dd 100644 --- a/spec/helpers/groups/group_members_helper_spec.rb +++ b/spec/helpers/groups/group_members_helper_spec.rb @@ -7,16 +7,6 @@ RSpec.describe Groups::GroupMembersHelper do let_it_be(:group) { create(:group) } - describe '.group_member_select_options' do - before do - helper.instance_variable_set(:@group, group) - end - - it 'returns an options hash' do - expect(helper.group_member_select_options).to include(multiple: true, scope: :all, email_user: true) - end - end - describe '#group_members_app_data' do include_context 'group_group_link' @@ -36,6 +26,7 @@ RSpec.describe Groups::GroupMembersHelper do allow(helper).to receive(:group_group_member_path).with(shared_group, ':id').and_return('/groups/foo-bar/-/group_members/:id') allow(helper).to receive(:group_group_link_path).with(shared_group, ':id').and_return('/groups/foo-bar/-/group_links/:id') allow(helper).to receive(:can?).with(current_user, :admin_group_member, shared_group).and_return(true) + allow(helper).to receive(:can?).with(current_user, :admin_member_access_request, shared_group).and_return(true) end subject do @@ -63,7 +54,8 @@ RSpec.describe Groups::GroupMembersHelper do it 'returns expected json' do expected = { source_id: shared_group.id, - can_manage_members: true + can_manage_members: true, + can_manage_access_requests: true } expect(subject).to include(expected) @@ -109,6 +101,7 @@ RSpec.describe Groups::GroupMembersHelper do allow(helper).to receive(:group_group_member_path).with(sub_shared_group, ':id').and_return('/groups/foo-bar/-/group_members/:id') allow(helper).to receive(:group_group_link_path).with(sub_shared_group, ':id').and_return('/groups/foo-bar/-/group_links/:id') allow(helper).to receive(:can?).with(current_user, :admin_group_member, sub_shared_group).and_return(true) + allow(helper).to receive(:can?).with(current_user, :admin_member_access_request, sub_shared_group).and_return(true) allow(helper).to receive(:can?).with(current_user, :export_group_memberships, sub_shared_group).and_return(true) end |