]> source.dussan.org Git - redmine.git/commitdiff
Make sure that Redmine::Thumbnail.generate is called.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 5 Dec 2014 12:22:35 +0000 (12:22 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 5 Dec 2014 12:22:35 +0000 (12:22 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@13714 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/attachment_test.rb

index d97ce93c7594f068dd12825c1eb1471a0f366532..7f53994e89ffef22f4fd416242e98992e39d2eb8 100644 (file)
@@ -349,7 +349,8 @@ class AttachmentTest < ActiveSupport::TestCase
     end
 
     def test_thumbnail_should_return_nil_if_generation_fails
-      Redmine::Thumbnail.stubs(:generate).raises(SystemCallError, 'Something went wrong')
+      Redmine::Thumbnail.expects(:generate).raises(SystemCallError, 'Something went wrong')
+      set_fixtures_attachments_directory
       attachment = Attachment.find(16)
       assert_nil attachment.thumbnail
     end