Refactor thumbnail markup for improved structure and semantics (#42133).

Patch by Katsuya HIDAKA (user:hidakatsuya).


git-svn-id: https://svn.redmine.org/redmine/trunk@23460 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2025-01-23 01:41:22 +00:00
parent 8d4a3da2d6
commit 0e9753c9fd
5 changed files with 21 additions and 21 deletions

View File

@@ -1918,11 +1918,12 @@ class ApplicationHelperTest < Redmine::HelperTest
end
def test_thumbnail_tag
a = Attachment.find(3)
assert_select_in(
thumbnail_tag(a),
'a[href=?] img[title=?][alt=?][src=?][loading="lazy"]',
"/attachments/3", "logo.gif", "logo.gif", "/attachments/thumbnail/3/200")
attachment = Attachment.find(3)
assert_select_in thumbnail_tag(attachment), 'div.thumbnail[title=?]', 'logo.gif' do
assert_select 'a[href=?]', '/attachments/3' do
assert_select 'img[alt=?][src=?][loading="lazy"]', "logo.gif", "/attachments/thumbnail/3/200"
end
end
end
def test_link_to_project