Commit 79b8323d authored by Valery Sizov's avatar Valery Sizov

[Multiple issue assignees] Fix issue atom feed

parent 34be1835
...@@ -26,9 +26,16 @@ xml.entry do ...@@ -26,9 +26,16 @@ xml.entry do
if issue.assignees.any? if issue.assignees.any?
xml.assignees do xml.assignees do
issue.assignees.each do |assignee| issue.assignees.each do |assignee|
xml.assignee do
xml.name assignee.name xml.name assignee.name
xml.email assignee.public_email xml.email assignee.public_email
end end
end end
end end
xml.assignee do
xml.name issue.assignees.first.name
xml.email issue.assignees.first.public_email
end
end
end end
...@@ -22,7 +22,8 @@ describe 'Issues Feed', feature: true do ...@@ -22,7 +22,8 @@ describe 'Issues Feed', feature: true do
to have_content('application/atom+xml') to have_content('application/atom+xml')
expect(body).to have_selector('title', text: "#{project.name} issues") expect(body).to have_selector('title', text: "#{project.name} issues")
expect(body).to have_selector('author email', text: issue.author_public_email) expect(body).to have_selector('author email', text: issue.author_public_email)
expect(body).to have_selector('assignees email', text: issue.author_public_email) expect(body).to have_selector('assignees assignee email', text: issue.assignees.first.public_email)
expect(body).to have_selector('assignee email', text: issue.assignees.first.public_email)
expect(body).to have_selector('entry summary', text: issue.title) expect(body).to have_selector('entry summary', text: issue.title)
end end
end end
...@@ -36,7 +37,8 @@ describe 'Issues Feed', feature: true do ...@@ -36,7 +37,8 @@ describe 'Issues Feed', feature: true do
to have_content('application/atom+xml') to have_content('application/atom+xml')
expect(body).to have_selector('title', text: "#{project.name} issues") expect(body).to have_selector('title', text: "#{project.name} issues")
expect(body).to have_selector('author email', text: issue.author_public_email) expect(body).to have_selector('author email', text: issue.author_public_email)
expect(body).to have_selector('assignees email', text: issue.author_public_email) expect(body).to have_selector('assignees assignee email', text: issue.assignees.first.public_email)
expect(body).to have_selector('assignee email', text: issue.assignees.first.public_email)
expect(body).to have_selector('entry summary', text: issue.title) expect(body).to have_selector('entry summary', text: issue.title)
end end
end end
......
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