[Multiple issue assignees] Fix issue atom feed

This commit is contained in:
Valery Sizov 2017-05-05 16:57:27 +03:00
parent 34be1835af
commit 79b8323d11
2 changed files with 13 additions and 4 deletions

View File

@ -26,9 +26,16 @@ xml.entry do
if issue.assignees.any?
xml.assignees do
issue.assignees.each do |assignee|
xml.name assignee.name
xml.email assignee.public_email
xml.assignee do
xml.name assignee.name
xml.email assignee.public_email
end
end
end
xml.assignee do
xml.name issue.assignees.first.name
xml.email issue.assignees.first.public_email
end
end
end

View File

@ -22,7 +22,8 @@ describe 'Issues Feed', feature: true do
to have_content('application/atom+xml')
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('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)
end
end
@ -36,7 +37,8 @@ describe 'Issues Feed', feature: true do
to have_content('application/atom+xml')
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('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)
end
end