diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-03-01 08:10:27 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-03-01 08:10:27 +0000 |
commit | 30ce0cd8fb28957f0d15423e12de7024fb94ac50 (patch) | |
tree | 3ff9962611baf57a92f2791d24836997e1444afa /test/unit/mailer_test.rb | |
parent | 7cdce2aeac662bec58bfa4ff3be0af4cefd4d31e (diff) | |
download | redmine-30ce0cd8fb28957f0d15423e12de7024fb94ac50.tar.gz redmine-30ce0cd8fb28957f0d15423e12de7024fb94ac50.zip |
Rails3: test: add .to_s for mail's bodies check at unit/mailer_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@9036 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/mailer_test.rb')
-rw-r--r-- | test/unit/mailer_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb index 18a045713..f39f3cdbe 100644 --- a/test/unit/mailer_test.rb +++ b/test/unit/mailer_test.rb @@ -470,7 +470,7 @@ class MailerTest < ActiveSupport::TestCase assert_equal 1, ActionMailer::Base.deliveries.size mail = last_email assert mail.bcc.include?('dlopper@somenet.foo') - assert mail.body.include?('Bug #3: Error 281 when updating a recipe') + assert mail.body.to_s.include?('Bug #3: Error 281 when updating a recipe') assert_equal '1 issue(s) due in the next 42 days', mail.subject end @@ -496,7 +496,7 @@ class MailerTest < ActiveSupport::TestCase assert_equal 1, ActionMailer::Base.deliveries.size # No mail for dlopper mail = last_email assert mail.bcc.include?('dlopper@somenet.foo') - assert mail.body.include?('Bug #3: Error 281 when updating a recipe') + assert mail.body.to_s.include?('Bug #3: Error 281 when updating a recipe') end def last_email @@ -514,7 +514,7 @@ class MailerTest < ActiveSupport::TestCase user.language = 'fr' Mailer.deliver_account_activated(user) mail = last_email - assert mail.body.include?('Votre compte') + assert mail.body.to_s.include?('Votre compte') assert_equal :it, current_language end |