diff options
author | Go MAEDA <maeda@farend.jp> | 2022-07-19 13:57:04 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2022-07-19 13:57:04 +0000 |
commit | 20ed193d93f303f5169e5de65e67436b5266da92 (patch) | |
tree | 449de4d283547720d7b47b0b305cbbc2716dfbeb /test/functional/previews_controller_test.rb | |
parent | 34b6581d552a417d67d945ee3d2aaf71177ad15a (diff) | |
download | redmine-20ed193d93f303f5169e5de65e67436b5266da92.tar.gz redmine-20ed193d93f303f5169e5de65e67436b5266da92.zip |
Thumbnail macro does not work when a file is attached and preview is displayed immediately (#37379).
Patch by Mizuki ISHIKAWA.
git-svn-id: https://svn.redmine.org/redmine/trunk@21716 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/previews_controller_test.rb')
-rw-r--r-- | test/functional/previews_controller_test.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/functional/previews_controller_test.rb b/test/functional/previews_controller_test.rb index aa282f364..789f67c21 100644 --- a/test/functional/previews_controller_test.rb +++ b/test/functional/previews_controller_test.rb @@ -88,6 +88,25 @@ class PreviewsControllerTest < Redmine::ControllerTest assert_select 'a.attachment', :text => 'foo.bar' end + def test_preview_issue_notes_should_show_thumbnail_of_file_immidiately_after_attachment + attachment = Attachment.generate!(filename: 'foo.png', digest: Redmine::Utils.random_hex(64)) + attachment.update(container: nil) + + @request.session[:user_id] = 2 + post( + :issue, + params: { + project_id: '1', + issue_id: 1, + field: 'notes', + text: '{{thumbnail(foo.png)}}', + attachments: {'1': { token: attachment.token }} + } + ) + assert_response :success + assert_select 'a.thumbnail[title=?]', 'foo.png' + end + def test_preview_new_news get( :news, |