]> git.openstreetmap.org Git - rails.git/commitdiff
Test that tags are included correctly in the changeset feed
authorTom Hughes <tom@compton.nu>
Tue, 18 Oct 2022 17:42:02 +0000 (18:42 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 18 Oct 2022 17:42:02 +0000 (18:42 +0100)
app/views/changesets/index.atom.builder
test/controllers/changesets_controller_test.rb

index 1363b8c023fb7c96851e6ddd5747c2a5fd635c8e..a1af72b911d4917ab4862feb504c099d5106e62d 100644 (file)
@@ -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)
 
index 31a1e2d0c77b43d35d263491aabadd8899bc7443..a71b5e8feb615773063a7c435c3a23350f524d48 100644 (file)
@@ -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