diff options
author | GitLab Release Tools Bot <delivery-team+release-tools@gitlab.com> | 2021-08-03 22:05:59 +0300 |
---|---|---|
committer | GitLab Release Tools Bot <delivery-team+release-tools@gitlab.com> | 2021-08-03 22:05:59 +0300 |
commit | a75a9a2364e2c397ac2c114129516c1cc9b1ecea (patch) | |
tree | 998c34c313877741aa4748cc87891d0aa2bf4bce /spec/services/issues/update_service_spec.rb | |
parent | c8edb9de30c95e9e715a1e31e7667f94fb7f3dec (diff) | |
parent | 8c67b4991465e92dcd6752cc42e54a9c5cd9f0f2 (diff) |
Merge remote-tracking branch 'dev/14-1-stable' into 14-1-stable
Diffstat (limited to 'spec/services/issues/update_service_spec.rb')
-rw-r--r-- | spec/services/issues/update_service_spec.rb | 25 |
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) |