Commit e4b997a5 authored by Arturo Herrero's avatar Arturo Herrero

Explicit context for Jira Server spec

parent 8cc1b55f
......@@ -8,7 +8,7 @@ RSpec.describe Integrations::Jira::IssueEntity do
let(:reporter) do
double(
'displayName' => 'reporter',
'name' => 'reporter@reporter.com'
'name' => double
)
end
......@@ -43,10 +43,7 @@ RSpec.describe Integrations::Jira::IssueEntity do
text_color: '#FFFFFF'
}
],
author: {
name: 'reporter',
web_url: 'http://jira.com/secure/ViewProfile.jspa?name=reporter@reporter.com'
},
author: hash_including(name: 'reporter'),
assignees: [
{ name: 'assignee' }
],
......@@ -56,6 +53,16 @@ RSpec.describe Integrations::Jira::IssueEntity do
)
end
context 'with Jira Server configuration' do
before do
allow(reporter).to receive(:name).and_return('reporter@reporter.com')
end
it 'returns the Jira Server profile URL' do
expect(subject[:author]).to include(web_url: 'http://jira.com/secure/ViewProfile.jspa?name=reporter@reporter.com')
end
end
context 'with Jira Cloud configuration' do
before do
allow(reporter).to receive(:accountId).and_return('12345')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment