diff options
Diffstat (limited to 'spec/services/jira_import/users_importer_spec.rb')
-rw-r--r-- | spec/services/jira_import/users_importer_spec.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/services/jira_import/users_importer_spec.rb b/spec/services/jira_import/users_importer_spec.rb index 7112443502c..c825f899f80 100644 --- a/spec/services/jira_import/users_importer_spec.rb +++ b/spec/services/jira_import/users_importer_spec.rb @@ -54,8 +54,11 @@ RSpec.describe JiraImport::UsersImporter do end context 'when jira client raises an error' do + let(:error) { Timeout::Error.new } + it 'returns an error response' do - expect(client).to receive(:get).and_raise(Timeout::Error) + expect(client).to receive(:get).and_raise(error) + expect(Gitlab::ErrorTracking).to receive(:log_exception).with(error, project_id: project.id) expect(subject.error?).to be_truthy expect(subject.message).to include('There was an error when communicating to Jira') |