]> source.dussan.org Git - redmine.git/commitdiff
Rails3: test: add .to_s for mail's bodies check at functional/files_controller_test.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 1 Mar 2012 08:07:10 +0000 (08:07 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 1 Mar 2012 08:07:10 +0000 (08:07 +0000)
On Rails3, mail's bodies must be checked calling 'encoded'.
'to_s' is alias of 'encoded' of Mail::Message of Rails3.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9031 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/files_controller_test.rb

index e37cc855e0ee22c3c116637f7b40b145c8dea962..08fbdf365ca60b023d81def55e52135bd0445533 100644 (file)
@@ -74,7 +74,7 @@ class FilesControllerTest < ActionController::TestCase
     mail = ActionMailer::Base.deliveries.last
     assert_not_nil mail
     assert_equal "[eCookbook] New file", mail.subject
-    assert mail.body.include?('testfile.txt')
+    assert mail.body.to_s.include?('testfile.txt')
   end
 
   def test_create_version_file