Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-11-17 03:53:10 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-11-17 03:53:10 +0300
commitb562a203320f7ea9e13917bf49fa8066c0aca6d4 (patch)
tree0cc279ee16b98bd5e9bfdb5814ea43b31c025e82 /spec
parenta84fa039e5dafa3ce7cde0869683ed2fdf5a38a4 (diff)
Add latest changes from gitlab-org/gitlab@16-6-stable-ee
Diffstat (limited to 'spec')
-rw-r--r--spec/models/group_spec.rb15
1 files changed, 15 insertions, 0 deletions
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