From b562a203320f7ea9e13917bf49fa8066c0aca6d4 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 17 Nov 2023 00:53:10 +0000 Subject: Add latest changes from gitlab-org/gitlab@16-6-stable-ee --- spec/models/group_spec.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'spec') diff --git a/spec/models/group_spec.rb b/spec/models/group_spec.rb index 2bca73545d0..7a31067732f 100644 --- a/spec/models/group_spec.rb +++ b/spec/models/group_spec.rb @@ -1447,6 +1447,21 @@ RSpec.describe Group, feature_category: :groups_and_projects do end end + context 'when there is user that does not exist' do + before do + # Simulate that the user is deleted but the LFK worker has not + # started yet. + deleted_user = create(:user) + create(:group_member, source: group, user: deleted_user) + + deleted_user.destroy! + end + + it 'returns the member-owners' do + expect(group.member_owners_excluding_project_bots).to contain_exactly(member_owner) + end + end + context 'with owners from a parent' do context 'when top-level group' do context 'with group sharing' do -- cgit v1.2.3