From: Toshi MARUYAMA Date: Thu, 1 Mar 2012 08:07:10 +0000 (+0000) Subject: Rails3: test: add .to_s for mail's bodies check at functional/files_controller_test.rb X-Git-Tag: 1.4.0~283 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=12ba0ba1c552151ffb015fcac68d682cc8e08e28;p=redmine.git Rails3: test: add .to_s for mail's bodies check at functional/files_controller_test.rb 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 --- diff --git a/test/functional/files_controller_test.rb b/test/functional/files_controller_test.rb index e37cc855e..08fbdf365 100644 --- a/test/functional/files_controller_test.rb +++ b/test/functional/files_controller_test.rb @@ -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