]> git.openstreetmap.org Git - rails.git/commitdiff
Use absolute paths to trace icon in traces feed
authorAnton Khorev <tony29@yandex.ru>
Wed, 20 Mar 2024 15:34:15 +0000 (18:34 +0300)
committerAnton Khorev <tony29@yandex.ru>
Wed, 20 Mar 2024 15:34:15 +0000 (18:34 +0300)
app/views/traces/_description.html.erb
test/controllers/traces_controller_test.rb

index 5fea819da26db58997e5756b6fc6030971e89bec..d77173730b7ae5d22b0d72f632c1affbc7ed1528 100644 (file)
@@ -1,4 +1,4 @@
-<%= image_tag trace_icon_path(description.user, description.id) %>
+<%= image_tag trace_icon_url(description.user, description.id) %>
 <% if description.size -%>
 <%= t ".description_with_count", :count => description.size, :user => description.user.display_name %>
 <% else -%>
index 2a6dc12dc3acb07c997eaa50993b62a95ffe29d1..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