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:
Diffstat (limited to 'spec/services/issues/update_service_spec.rb')
-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])