]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/traces_controller_test.rb
Use absolute paths to trace icon in traces feed
[rails.git] / test / controllers / traces_controller_test.rb
index 1953b637894c83a6ef88406679257d06d7234ace..9a818786df9ff26f203a2172d0a085f359724264 100644 (file)
@@ -810,7 +810,11 @@ class TracesControllerTest < ActionDispatch::IntegrationTest
             assert_select item, "title", trace.name
             assert_select item, "link", "http://www.example.com/user/#{ERB::Util.u(trace.user.display_name)}/traces/#{trace.id}"
             assert_select item, "guid", "http://www.example.com/user/#{ERB::Util.u(trace.user.display_name)}/traces/#{trace.id}"
-            assert_select item, "description"
+            assert_select item, "description" do
+              assert_dom_encoded do
+                assert_select "img[src='#{trace_icon_url trace.user, trace}']"
+              end
+            end
             # assert_select item, "dc:creator", trace.user.display_name
             assert_select item, "pubDate", trace.timestamp.rfc822
           end
@@ -833,6 +837,7 @@ class TracesControllerTest < ActionDispatch::IntegrationTest
             assert_select row, "li", Regexp.new(Regexp.escape("#{trace.size} points")) if trace.inserted?
             assert_select row, "td", Regexp.new(Regexp.escape(trace.description))
             assert_select row, "td", Regexp.new(Regexp.escape("by #{trace.user.display_name}"))
+            assert_select row, "a[href='#{user_path trace.user}']", :text => trace.user.display_name
           end
         end
       end
@@ -845,7 +850,7 @@ class TracesControllerTest < ActionDispatch::IntegrationTest
 
     assert_select "table", :count => 1 do
       assert_select "td", /^#{Regexp.quote(trace.name)} /
-      assert_select "td", trace.user.display_name
+      assert_select "td a[href='#{user_path trace.user}']", :text => trace.user.display_name
       assert_select "td", trace.description
     end
   end