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.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/services/issues/update_service_spec.rb b/spec/services/issues/update_service_spec.rb
index 70c3c2a0f5d..1e922401028 100644
--- a/spec/services/issues/update_service_spec.rb
+++ b/spec/services/issues/update_service_spec.rb
@@ -82,6 +82,31 @@ RSpec.describe Issues::UpdateService, :mailer do
expect(issue.milestone).to eq milestone
end
+ context 'when sentry identifier is given' do
+ before do
+ sentry_attributes = { sentry_issue_attributes: { sentry_issue_identifier: 42 } }
+ opts.merge!(sentry_attributes)
+ end
+
+ it 'assigns the sentry error' do
+ update_issue(opts)
+
+ expect(issue.sentry_issue).to be_kind_of(SentryIssue)
+ end
+
+ context 'user is a guest' do
+ before do
+ project.add_guest(user)
+ end
+
+ it 'does not assign the sentry error' do
+ update_issue(opts)
+
+ expect(issue.sentry_issue).to eq(nil)
+ end
+ end
+ end
+
context 'when issue type is not incident' do
before do
update_issue(opts)