Fix rubocop offenses (#43745).

git-svn-id: https://svn.redmine.org/redmine/trunk@24451 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Marius Balteanu
2026-02-23 04:28:09 +00:00
parent a1a0959773
commit e0f094d03e

View File

@@ -107,14 +107,14 @@ class Redmine::WikiFormatting::InlineAttachmentsScrubberTest < Redmine::HelperTe
def test_should_resolve_attachments_from_journal
issue = Issue.generate!
attachment_1 = Attachment.generate!(:file => mock_file_with_options(:original_filename => "attached_on_issue.png"), :container => issue)
attachment1 = Attachment.generate!(:file => mock_file_with_options(:original_filename => "attached_on_issue.png"), :container => issue)
journal = issue.init_journal(User.find(2), issue)
attachment_2 = Attachment.generate!(:file => mock_file_with_options(:original_filename => "attached_on_journal.png"), :container => issue)
journal.journalize_attachment(attachment_2, :added)
attachment2 = Attachment.generate!(:file => mock_file_with_options(:original_filename => "attached_on_journal.png"), :container => issue)
journal.journalize_attachment(attachment2, :added)
html = '<img src="attached_on_issue.png" alt=""><img src="attached_on_journal.png" alt="">'
expected = %(<img src="/attachments/download/#{attachment_1.id}/attached_on_issue.png" alt="" loading="lazy">) +
%(<img src="/attachments/download/#{attachment_2.id}/attached_on_journal.png" alt="" loading="lazy">)
expected = %(<img src="/attachments/download/#{attachment1.id}/attached_on_issue.png" alt="" loading="lazy">) +
%(<img src="/attachments/download/#{attachment2.id}/attached_on_journal.png" alt="" loading="lazy">)
assert_equal expected, filter(html, :object => journal)
end