diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-04 03:09:04 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-04 03:09:04 +0300 |
commit | 27a18afc7dba4e09a5ec78e5c251c31216d7792a (patch) | |
tree | 5dcc015be79e00de4133a66defe10bf1463ff827 /spec/services/error_tracking/issue_details_service_spec.rb | |
parent | 71c9d577ad563572050335dc261ba7673e3e566f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/error_tracking/issue_details_service_spec.rb')
-rw-r--r-- | spec/services/error_tracking/issue_details_service_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/services/error_tracking/issue_details_service_spec.rb b/spec/services/error_tracking/issue_details_service_spec.rb index 26bb3b44126..60d6172ef64 100644 --- a/spec/services/error_tracking/issue_details_service_spec.rb +++ b/spec/services/error_tracking/issue_details_service_spec.rb @@ -9,6 +9,7 @@ describe ErrorTracking::IssueDetailsService do context 'with authorized user' do context 'when issue_details returns a detailed error' do let(:detailed_error) { build(:detailed_error_tracking_error) } + let(:params) { { issue_id: detailed_error.id } } before do expect(error_tracking_setting) @@ -18,6 +19,19 @@ describe ErrorTracking::IssueDetailsService do it 'returns the detailed error' do expect(result).to eq(status: :success, issue: detailed_error) end + + it 'returns the gitlab_issue when the error has a sentry_issue' do + gitlab_issue = create(:issue, project: project) + create(:sentry_issue, issue: gitlab_issue, sentry_issue_identifier: detailed_error.id) + + expect(result[:issue].gitlab_issue).to include( + "http", "/#{project.full_path}/issues/#{gitlab_issue.iid}" + ) + end + + it 'returns the gitlab_issue path from sentry when the error has no sentry_issue' do + expect(result[:issue].gitlab_issue).to eq(detailed_error.gitlab_issue) + end end include_examples 'error tracking service data not ready', :issue_details |