提交 79b8323d 编写于 作者: V Valery Sizov

[Multiple issue assignees] Fix issue atom feed

上级 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.name assignee.name xml.assignee do
xml.email assignee.public_email xml.name assignee.name
xml.email assignee.public_email
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 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册