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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-12-21 21:16:10 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-12-21 21:16:10 +0300
commitd2f2219fd58e572c10d77183e2f65de8fcc8df96 (patch)
tree2cde75cd3d994b7febe1349ab61b7a94a95c78cf /spec/services
parent6323146895db2be6f04846b3c98060b7349207b9 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/issues/update_service_spec.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/services/issues/update_service_spec.rb b/spec/services/issues/update_service_spec.rb
index 0cb13bfb917..e8bcdc2c44b 100644
--- a/spec/services/issues/update_service_spec.rb
+++ b/spec/services/issues/update_service_spec.rb
@@ -592,11 +592,19 @@ RSpec.describe Issues::UpdateService, :mailer, feature_category: :team_planning
update_issue(confidential: true)
end
+ it 'allows assignment of guest users' do
+ update_issue(confidential: true)
+
+ update_issue(assignee_ids: [guest.id])
+
+ expect(issue.reload.assignees).to contain_exactly(guest)
+ end
+
it 'does not update assignee_id with unauthorized users' do
- project.update!(visibility_level: Gitlab::VisibilityLevel::PUBLIC)
update_issue(confidential: true)
+
non_member = create(:user)
- original_assignees = issue.assignees
+ original_assignees = issue.assignees.to_a
update_issue(assignee_ids: [non_member.id])