From 1ca91ecbac4443ac87ccae9f7c264537f03211c5 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Wed, 20 Mar 2024 18:34:15 +0300 Subject: [PATCH 1/1] Use absolute paths to trace icon in traces feed --- app/views/traces/_description.html.erb | 2 +- test/controllers/traces_controller_test.rb | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) 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 -- 2.39.5