diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-01 12:17:48 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-01 12:17:48 +0000 |
commit | cbce607eef01db76e6923ce684aa31af248c004d (patch) | |
tree | 172e75a56c6ec5d2c6bc61eb545d712d971b489b /spec/finders/groups/user_groups_finder_spec.rb | |
parent | d27481e8f3dd252b543f65cb56a98eeb00de855f (diff) | |
download | gitlab-ce-cbce607eef01db76e6923ce684aa31af248c004d.tar.gz |
Add latest changes from gitlab-org/security/gitlab@15-11-stable-ee
Diffstat (limited to 'spec/finders/groups/user_groups_finder_spec.rb')
-rw-r--r-- | spec/finders/groups/user_groups_finder_spec.rb | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/spec/finders/groups/user_groups_finder_spec.rb b/spec/finders/groups/user_groups_finder_spec.rb index 999079468e5..f6df396037c 100644 --- a/spec/finders/groups/user_groups_finder_spec.rb +++ b/spec/finders/groups/user_groups_finder_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Groups::UserGroupsFinder do +RSpec.describe Groups::UserGroupsFinder, feature_category: :subgroups do describe '#execute' do let_it_be(:user) { create(:user) } let_it_be(:root_group) { create(:group, name: 'Root group', path: 'root-group') } @@ -98,6 +98,24 @@ RSpec.describe Groups::UserGroupsFinder do end end + context 'when permission is :import_projects' do + let(:arguments) { { permission_scope: :import_projects } } + + specify do + is_expected.to contain_exactly( + public_maintainer_group, + public_owner_group, + private_maintainer_group + ) + end + + it_behaves_like 'user group finder searching by name or path' do + let(:keyword_search_expected_groups) do + [public_maintainer_group] + end + end + end + context 'when permission is :transfer_projects' do let(:arguments) { { permission_scope: :transfer_projects } } |