diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /spec/finders/group_members_finder_spec.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'spec/finders/group_members_finder_spec.rb')
-rw-r--r-- | spec/finders/group_members_finder_spec.rb | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/spec/finders/group_members_finder_spec.rb b/spec/finders/group_members_finder_spec.rb index 00aa14209a2..0d1b58e2636 100644 --- a/spec/finders/group_members_finder_spec.rb +++ b/spec/finders/group_members_finder_spec.rb @@ -21,10 +21,10 @@ RSpec.describe GroupMembersFinder, '#execute' do let(:groups) do { - group: group, - sub_group: sub_group, - sub_sub_group: sub_sub_group, - public_shared_group: public_shared_group, + group: group, + sub_group: sub_group, + sub_sub_group: sub_sub_group, + public_shared_group: public_shared_group, private_shared_group: private_shared_group } end @@ -32,26 +32,27 @@ RSpec.describe GroupMembersFinder, '#execute' do context 'relations' do let!(:members) do { - user1_sub_sub_group: create(:group_member, :maintainer, group: sub_sub_group, user: user1), - user1_sub_group: create(:group_member, :developer, group: sub_group, user: user1), - user1_group: create(:group_member, :reporter, group: group, user: user1), - user1_public_shared_group: create(:group_member, :maintainer, group: public_shared_group, user: user1), + user1_sub_sub_group: create(:group_member, :maintainer, group: sub_sub_group, user: user1), + user1_sub_group: create(:group_member, :developer, group: sub_group, user: user1), + user1_group: create(:group_member, :reporter, group: group, user: user1), + user1_public_shared_group: create(:group_member, :maintainer, group: public_shared_group, user: user1), user1_private_shared_group: create(:group_member, :maintainer, group: private_shared_group, user: user1), - user2_sub_sub_group: create(:group_member, :reporter, group: sub_sub_group, user: user2), - user2_sub_group: create(:group_member, :developer, group: sub_group, user: user2), - user2_group: create(:group_member, :maintainer, group: group, user: user2), - user2_public_shared_group: create(:group_member, :developer, group: public_shared_group, user: user2), - user2_private_shared_group: create(:group_member, :developer, group: private_shared_group, user: user2), - user3_sub_sub_group: create(:group_member, :developer, group: sub_sub_group, user: user3, expires_at: 1.day.from_now), - user3_sub_group: create(:group_member, :developer, group: sub_group, user: user3, expires_at: 2.days.from_now), - user3_group: create(:group_member, :reporter, group: group, user: user3), - user3_public_shared_group: create(:group_member, :reporter, group: public_shared_group, user: user3), - user3_private_shared_group: create(:group_member, :reporter, group: private_shared_group, user: user3), - user4_sub_sub_group: create(:group_member, :reporter, group: sub_sub_group, user: user4), - user4_sub_group: create(:group_member, :developer, group: sub_group, user: user4, expires_at: 1.day.from_now), - user4_group: create(:group_member, :developer, group: group, user: user4, expires_at: 2.days.from_now), - user4_public_shared_group: create(:group_member, :developer, group: public_shared_group, user: user4), - user4_private_shared_group: create(:group_member, :developer, group: private_shared_group, user: user4) + user2_sub_sub_group: create(:group_member, :reporter, group: sub_sub_group, user: user2), + user2_sub_group: create(:group_member, :developer, group: sub_group, user: user2), + user2_group: create(:group_member, :maintainer, group: group, user: user2), + user2_public_shared_group: create(:group_member, :developer, group: public_shared_group, user: user2), + user2_private_shared_group: create(:group_member, :developer, group: private_shared_group, user: user2), + user3_sub_sub_group: create(:group_member, :developer, group: sub_sub_group, user: user3, expires_at: 1.day.from_now), + user3_sub_group: create(:group_member, :developer, group: sub_group, user: user3, expires_at: 2.days.from_now), + user3_group: create(:group_member, :reporter, group: group, user: user3), + user3_public_shared_group: create(:group_member, :reporter, group: public_shared_group, user: user3), + user3_private_shared_group: create(:group_member, :reporter, group: private_shared_group, user: user3), + user4_sub_sub_group: create(:group_member, :reporter, group: sub_sub_group, user: user4), + user4_sub_group: create(:group_member, :developer, group: sub_group, user: user4, expires_at: 1.day.from_now), + user4_group: create(:group_member, :developer, group: group, user: user4, expires_at: 2.days.from_now), + user4_public_shared_group: create(:group_member, :developer, group: public_shared_group, user: user4), + user4_private_shared_group: create(:group_member, :developer, group: private_shared_group, user: user4), + user5_private_shared_group: create(:group_member, :developer, group: private_shared_group, user: user5) } end @@ -76,15 +77,15 @@ RSpec.describe GroupMembersFinder, '#execute' do [:direct] | :sub_group | [:user1_sub_group, :user2_sub_group, :user3_sub_group, :user4_sub_group] [:inherited] | :sub_group | [:user1_group, :user2_group, :user3_group, :user4_group] [:descendants] | :sub_group | [:user1_sub_sub_group, :user2_sub_sub_group, :user3_sub_sub_group, :user4_sub_sub_group] - [:shared_from_groups] | :sub_group | [] - [:direct, :inherited, :descendants, :shared_from_groups] | :sub_group | [:user1_sub_sub_group, :user2_group, :user3_sub_group, :user4_group] + [:shared_from_groups] | :sub_group | [:user1_public_shared_group, :user2_public_shared_group, :user3_public_shared_group, :user4_public_shared_group] + [:direct, :inherited, :descendants, :shared_from_groups] | :sub_group | [:user1_sub_sub_group, :user2_group, :user3_sub_group, :user4_public_shared_group] [] | :sub_sub_group | [] GroupMembersFinder::DEFAULT_RELATIONS | :sub_sub_group | [:user1_sub_sub_group, :user2_group, :user3_sub_group, :user4_group] [:direct] | :sub_sub_group | [:user1_sub_sub_group, :user2_sub_sub_group, :user3_sub_sub_group, :user4_sub_sub_group] [:inherited] | :sub_sub_group | [:user1_sub_group, :user2_group, :user3_sub_group, :user4_group] [:descendants] | :sub_sub_group | [] - [:shared_from_groups] | :sub_sub_group | [] - [:direct, :inherited, :descendants, :shared_from_groups] | :sub_sub_group | [:user1_sub_sub_group, :user2_group, :user3_sub_group, :user4_group] + [:shared_from_groups] | :sub_sub_group | [:user1_public_shared_group, :user2_public_shared_group, :user3_public_shared_group, :user4_public_shared_group] + [:direct, :inherited, :descendants, :shared_from_groups] | :sub_sub_group | [:user1_sub_sub_group, :user2_group, :user3_sub_group, :user4_public_shared_group] end with_them do |