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/jira/requests/projects/list_service_spec.rb')
-rw-r--r--spec/services/jira/requests/projects/list_service_spec.rb15
1 files changed, 1 insertions, 14 deletions
diff --git a/spec/services/jira/requests/projects/list_service_spec.rb b/spec/services/jira/requests/projects/list_service_spec.rb
index ab15254d948..78ee9cb9698 100644
--- a/spec/services/jira/requests/projects/list_service_spec.rb
+++ b/spec/services/jira/requests/projects/list_service_spec.rb
@@ -43,20 +43,7 @@ RSpec.describe Jira::Requests::Projects::ListService do
stub_request(:get, expected_url_pattern).to_return(status: 200, body: response_body, headers: response_headers)
end
- context 'when the request to Jira returns an error' do
- before do
- expect_next(JIRA::Client).to receive(:get).and_raise(Timeout::Error)
- end
-
- it 'returns an error response' do
- expect(Gitlab::ProjectServiceLogger).to receive(:error).with(
- hash_including(
- error: hash_including(:exception_class, :exception_message, :exception_backtrace)))
- .and_call_original
- expect(subject.error?).to be_truthy
- expect(subject.message).to eq('Jira request error: Timeout::Error')
- end
- end
+ it_behaves_like 'a service that handles Jira API errors'
context 'when jira runs on a subpath' do
let(:jira_integration) { create(:jira_integration, url: 'http://jira.example.com/jira') }