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/error_tracking/issue_update_service_spec.rb')
-rw-r--r--spec/services/error_tracking/issue_update_service_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/services/error_tracking/issue_update_service_spec.rb b/spec/services/error_tracking/issue_update_service_spec.rb
index 9ed24038ed8..31a66654100 100644
--- a/spec/services/error_tracking/issue_update_service_spec.rb
+++ b/spec/services/error_tracking/issue_update_service_spec.rb
@@ -114,6 +114,21 @@ RSpec.describe ErrorTracking::IssueUpdateService do
end
include_examples 'error tracking service sentry error handling', :update_issue
+
+ context 'integrated error tracking' do
+ let(:error) { create(:error_tracking_error, project: project) }
+ let(:arguments) { { issue_id: error.id, status: 'resolved' } }
+ let(:update_issue_response) { { updated: true, status: :success, closed_issue_iid: nil } }
+
+ before do
+ error_tracking_setting.update!(integrated: true)
+ end
+
+ it 'resolves the error and responds with expected format' do
+ expect(update_service.execute).to eq(update_issue_response)
+ expect(error.reload.status).to eq('resolved')
+ end
+ end
end
include_examples 'error tracking service unauthorized user'