]> source.dussan.org Git - redmine.git/commitdiff
Rails3: test: add .to_s for mail's bodies check at functional/messages_controller_test.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 1 Mar 2012 08:08:25 +0000 (08:08 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 1 Mar 2012 08:08:25 +0000 (08:08 +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@9033 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/messages_controller_test.rb

index b24a444d86ad19302453957f19d9b3a032ff59af..5c04a65b1f4d50b8ffff248e68b6778b79d245fd 100644 (file)
@@ -106,7 +106,7 @@ class MessagesControllerTest < ActionController::TestCase
     mail = ActionMailer::Base.deliveries.last
     assert_not_nil mail
     assert_equal "[#{message.board.project.name} - #{message.board.name} - msg#{message.root.id}] Test created message", mail.subject
-    assert mail.body.include?('Message body')
+    assert mail.body.to_s.include?('Message body')
     # author
     assert mail.bcc.include?('jsmith@somenet.foo')
     # project member