Fix missing dc:creator on RSS feed (#16898)
* Fix missing dc:creator on RSS feed * Update spec * Remove aggregate_failures
This commit is contained in:
parent
f5236be09e
commit
8379232bb3
2 changed files with 10 additions and 11 deletions
|
|
@ -40,7 +40,7 @@ xml.rss(:version => "2.0",
|
|||
articles.each do |article|
|
||||
xml.item do
|
||||
xml.title article.title
|
||||
xml.tag!("dc:creator") { user.instance_of?(User) ? user.name : article.user.name }
|
||||
xml.tag!("dc:creator", user.instance_of?(User) ? user.name : article.user.name)
|
||||
xml.pubDate article.published_at.to_s(:rfc822) if article.published_at
|
||||
xml.link app_url(article.path)
|
||||
xml.guid app_url(article.path)
|
||||
|
|
|
|||
|
|
@ -95,16 +95,15 @@ RSpec.describe "Articles", type: :request do
|
|||
expect(response.body).not_to include(organization_article.title)
|
||||
end
|
||||
|
||||
it "contains the full user URL" do
|
||||
expect(response.body).to include("<link>#{URL.user(user)}</link>")
|
||||
end
|
||||
|
||||
it "contains a user composite profile image tag", :aggregate_failures do
|
||||
expect(response.body).to include("<image>")
|
||||
expect(response.body).to include("<url>#{app_url(user.profile_image_90)}</url>")
|
||||
expect(response.body).to include("<title>#{community_name}: #{user.name}</title>")
|
||||
expect(response.body).to include("<link>#{URL.user(user)}</link>")
|
||||
expect(response.body).to include("</image>")
|
||||
it "contains user's name, link, and composite profile image tag" do
|
||||
expect(response.body).to include(
|
||||
"<image>",
|
||||
"<url>#{app_url(user.profile_image_90)}</url>",
|
||||
"<title>#{community_name}: #{user.name}</title>",
|
||||
"<link>#{URL.user(user)}</link>",
|
||||
"</image>",
|
||||
"<dc:creator>#{user.name}</dc:creator>",
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue