diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-15 15:08:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-15 15:08:47 +0300 |
commit | 717436a767395d0ed850a16d07f19cd51c3d4551 (patch) | |
tree | 5c2d69721710081da88c8dcf097813e2f40c062c /spec/services | |
parent | 5a14a0fe63ac7dace9821be554ad3b3951529708 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/projects/participants_service_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/services/projects/participants_service_spec.rb b/spec/services/projects/participants_service_spec.rb index 8c0f68dee4c..2f090577805 100644 --- a/spec/services/projects/participants_service_spec.rb +++ b/spec/services/projects/participants_service_spec.rb @@ -179,6 +179,18 @@ RSpec.describe Projects::ParticipantsService, feature_category: :groups_and_proj end end + context 'when public project maintainer is signed in' do + let(:service) { described_class.new(public_project, public_project_maintainer) } + + it 'returns private group members' do + expect(usernames).to include(private_group_member.username) + end + + it 'returns members of the ancestral groups of the private group' do + expect(usernames).to include(group_ancestor_owner.username) + end + end + context 'when private group owner is signed in' do let(:service) { described_class.new(public_project, private_group_owner) } |