From: Anton Khorev Date: Wed, 20 Mar 2024 15:34:15 +0000 (+0300) Subject: Use absolute paths to trace icon in traces feed X-Git-Tag: live~239^2~1 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/1ca91ecbac4443ac87ccae9f7c264537f03211c5?hp=edd8bf77394a667246b548b169914002858e13d6 Use absolute paths to trace icon in traces feed --- diff --git a/app/views/traces/_description.html.erb b/app/views/traces/_description.html.erb index 5fea819da..d77173730 100644 --- a/app/views/traces/_description.html.erb +++ b/app/views/traces/_description.html.erb @@ -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 -%> diff --git a/test/controllers/traces_controller_test.rb b/test/controllers/traces_controller_test.rb index 2a6dc12dc..9a818786d 100644 --- a/test/controllers/traces_controller_test.rb +++ b/test/controllers/traces_controller_test.rb @@ -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