mirror of
https://github.com/redmine/redmine.git
synced 2025-11-01 19:05:51 +01:00
Use relative URL for thumbnails according to :only_path option (#18119).
git-svn-id: http://svn.redmine.org/redmine/trunk@13451 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -302,26 +302,35 @@ RAW
|
||||
end
|
||||
|
||||
def test_macro_thumbnail
|
||||
link = link_to('<img alt="testfile.PNG" src="http://test.host/attachments/thumbnail/17" />'.html_safe,
|
||||
"http://test.host/attachments/17",
|
||||
link = link_to('<img alt="testfile.PNG" src="/attachments/thumbnail/17" />'.html_safe,
|
||||
"/attachments/17",
|
||||
:class => "thumbnail",
|
||||
:title => "testfile.PNG")
|
||||
assert_equal "<p>#{link}</p>",
|
||||
textilizable("{{thumbnail(testfile.png)}}", :object => Issue.find(14))
|
||||
end
|
||||
|
||||
def test_macro_thumbnail_with_size
|
||||
link = link_to('<img alt="testfile.PNG" src="http://test.host/attachments/thumbnail/17/200" />'.html_safe,
|
||||
def test_macro_thumbnail_with_full_path
|
||||
link = link_to('<img alt="testfile.PNG" src="http://test.host/attachments/thumbnail/17" />'.html_safe,
|
||||
"http://test.host/attachments/17",
|
||||
:class => "thumbnail",
|
||||
:title => "testfile.PNG")
|
||||
assert_equal "<p>#{link}</p>",
|
||||
textilizable("{{thumbnail(testfile.png)}}", :object => Issue.find(14), :only_path => false)
|
||||
end
|
||||
|
||||
def test_macro_thumbnail_with_size
|
||||
link = link_to('<img alt="testfile.PNG" src="/attachments/thumbnail/17/200" />'.html_safe,
|
||||
"/attachments/17",
|
||||
:class => "thumbnail",
|
||||
:title => "testfile.PNG")
|
||||
assert_equal "<p>#{link}</p>",
|
||||
textilizable("{{thumbnail(testfile.png, size=200)}}", :object => Issue.find(14))
|
||||
end
|
||||
|
||||
def test_macro_thumbnail_with_title
|
||||
link = link_to('<img alt="testfile.PNG" src="http://test.host/attachments/thumbnail/17" />'.html_safe,
|
||||
"http://test.host/attachments/17",
|
||||
link = link_to('<img alt="testfile.PNG" src="/attachments/thumbnail/17" />'.html_safe,
|
||||
"/attachments/17",
|
||||
:class => "thumbnail",
|
||||
:title => "Cool image")
|
||||
assert_equal "<p>#{link}</p>",
|
||||
|
||||
Reference in New Issue
Block a user