From: Tom Hughes Date: Tue, 18 Oct 2022 17:42:02 +0000 (+0100) Subject: Test that tags are included correctly in the changeset feed X-Git-Tag: live~1522 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/140b296f59c1dbdb5747f40ec2dc38f1402d9a01?ds=sidebyside Test that tags are included correctly in the changeset feed --- diff --git a/app/views/changesets/index.atom.builder b/app/views/changesets/index.atom.builder index 1363b8c02..a1af72b91 100644 --- a/app/views/changesets/index.atom.builder +++ b/app/views/changesets/index.atom.builder @@ -1,6 +1,7 @@ atom_feed(:language => I18n.locale, :schema_date => 2009, :id => url_for(@params.merge(:only_path => false)), :root_url => url_for(@params.merge(:action => :index, :format => nil, :only_path => false)), + "xmlns:xhtml" => "http://www.w3.org/1999/xhtml", "xmlns:georss" => "http://www.georss.org/georss") do |feed| feed.title changeset_index_title(params, current_user) diff --git a/test/controllers/changesets_controller_test.rb b/test/controllers/changesets_controller_test.rb index 31a1e2d0c..a71b5e8fe 100644 --- a/test/controllers/changesets_controller_test.rb +++ b/test/controllers/changesets_controller_test.rb @@ -329,6 +329,14 @@ class ChangesetsControllerTest < ActionDispatch::IntegrationTest changesets.each do |changeset| assert_select "> entry > id", changeset_url(:id => changeset.id) + + assert_select "> entry > content > xhtml|div > xhtml|table" do + assert_select "> xhtml|tr > xhtml|td > xhtml|table" do + changeset.tags.each do |key, _| + assert_select "> xhtml|tr > xhtml|td", :text => /^#{key} = / + end + end + end end end end