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/models/project_services/jira_service_spec.rb')
-rw-r--r--spec/models/project_services/jira_service_spec.rb16
1 files changed, 6 insertions, 10 deletions
diff --git a/spec/models/project_services/jira_service_spec.rb b/spec/models/project_services/jira_service_spec.rb
index a0d36f0a238..20e85f0fd4b 100644
--- a/spec/models/project_services/jira_service_spec.rb
+++ b/spec/models/project_services/jira_service_spec.rb
@@ -688,22 +688,18 @@ describe JiraService do
context 'when the test fails' do
it 'returns result with the error' do
test_url = 'http://jira.example.com/rest/api/2/serverInfo'
+ error_message = 'Some specific failure.'
WebMock.stub_request(:get, test_url).with(basic_auth: [username, password])
- .to_raise(JIRA::HTTPError.new(double(message: 'Some specific failure.')))
+ .to_raise(JIRA::HTTPError.new(double(message: error_message)))
expect(jira_service).to receive(:log_error).with(
- "Error sending message",
- hash_including(
- client_url: url,
- error: hash_including(
- exception_class: 'JIRA::HTTPError',
- exception_message: 'Some specific failure.'
- )
- )
+ 'Error sending message',
+ client_url: 'http://jira.example.com',
+ error: error_message
)
- expect(jira_service.test(nil)).to eq(success: false, result: 'Some specific failure.')
+ expect(jira_service.test(nil)).to eq(success: false, result: error_message)
end
end
end