diff options
author | Go MAEDA <maeda@farend.jp> | 2019-10-31 13:07:14 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-10-31 13:07:14 +0000 |
commit | 3ece374177451a37eb7c8a3d135aff60962cd387 (patch) | |
tree | 9a88021176eef265ed265949728029212f276aca /test/unit/attachment_test.rb | |
parent | 5d2960d36f9a84ae8d3c2d98edb0c0b95ab0b7ab (diff) | |
download | redmine-3ece374177451a37eb7c8a3d135aff60962cd387.tar.gz redmine-3ece374177451a37eb7c8a3d135aff60962cd387.zip |
Don't try to generate thumbnails if convert command is not available (#32289).
Patch by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@18885 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/attachment_test.rb')
-rw-r--r-- | test/unit/attachment_test.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/unit/attachment_test.rb b/test/unit/attachment_test.rb index fbbe71fbe..abe42587c 100644 --- a/test/unit/attachment_test.rb +++ b/test/unit/attachment_test.rb @@ -420,7 +420,12 @@ class AttachmentTest < ActiveSupport::TestCase assert_equal true, Attachment.new(:filename => 'test.jpg').thumbnailable? end - def test_thumbnailable_should_be_true_for_non_images + def test_thumbnailable_should_be_false_for_images_if_convert_is_unavailable + Redmine::Thumbnail.stubs(:convert_available?).returns(false) + assert_equal false, Attachment.new(:filename => 'test.jpg').thumbnailable? + end + + def test_thumbnailable_should_be_false_for_non_images assert_equal false, Attachment.new(:filename => 'test.txt').thumbnailable? end |