1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-20 15:31:12 +00:00

cleanup: rubocop: fix Layout/AlignArguments in ApplicationHelperTest#test_link_to_attachment

git-svn-id: http://svn.redmine.org/redmine/trunk@19053 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2019-11-09 18:16:27 +00:00
parent 8e6014a9f8
commit 22bce3517b

View File

@ -1611,17 +1611,22 @@ class ApplicationHelperTest < Redmine::HelperTest
def test_link_to_attachment def test_link_to_attachment
a = Attachment.find(3) a = Attachment.find(3)
assert_equal '<a href="/attachments/3">logo.gif</a>', assert_equal(
link_to_attachment(a) '<a href="/attachments/3">logo.gif</a>',
assert_equal '<a href="/attachments/3">Text</a>', link_to_attachment(a))
link_to_attachment(a, :text => 'Text') assert_equal(
'<a href="/attachments/3">Text</a>',
link_to_attachment(a, :text => 'Text'))
result = link_to("logo.gif", "/attachments/3", :class => "foo") result = link_to("logo.gif", "/attachments/3", :class => "foo")
assert_equal result, assert_equal(
link_to_attachment(a, :class => 'foo') result,
assert_equal '<a href="/attachments/download/3/logo.gif">logo.gif</a>', link_to_attachment(a, :class => 'foo'))
link_to_attachment(a, :download => true) assert_equal(
assert_equal '<a href="http://test.host/attachments/3">logo.gif</a>', '<a href="/attachments/download/3/logo.gif">logo.gif</a>',
link_to_attachment(a, :only_path => false) link_to_attachment(a, :download => true))
assert_equal(
'<a href="http://test.host/attachments/3">logo.gif</a>',
link_to_attachment(a, :only_path => false))
end end
def test_thumbnail_tag def test_thumbnail_tag