diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-03-01 08:08:58 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-03-01 08:08:58 +0000 |
commit | e70f7ba75ca858e3eef914d4183524bc189a99c2 (patch) | |
tree | 72b9edae7b354141e3fb051887227dee5540129f /test/functional/users_controller_test.rb | |
parent | fd18bcef95bbc42eeac5db7f35023079be7b4cb9 (diff) | |
download | redmine-e70f7ba75ca858e3eef914d4183524bc189a99c2.tar.gz redmine-e70f7ba75ca858e3eef914d4183524bc189a99c2.zip |
Rails3: test: add .to_s for mail's bodies check at functional/users_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@9034 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/users_controller_test.rb')
-rw-r--r-- | test/functional/users_controller_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb index 3fc224d01..74b9e14d5 100644 --- a/test/functional/users_controller_test.rb +++ b/test/functional/users_controller_test.rb @@ -191,7 +191,7 @@ class UsersControllerTest < ActionController::TestCase mail = ActionMailer::Base.deliveries.last assert_not_nil mail assert_equal [user.mail], mail.bcc - assert mail.body.include?('secret') + assert mail.body.to_s.include?('secret') end def test_create_with_failure @@ -252,7 +252,7 @@ class UsersControllerTest < ActionController::TestCase mail = ActionMailer::Base.deliveries.last assert_not_nil mail assert_equal ['foo.bar@somenet.foo'], mail.bcc - assert mail.body.include?(ll('fr', :notice_account_activated)) + assert mail.body.to_s.include?(ll('fr', :notice_account_activated)) end def test_update_with_password_change_should_send_a_notification @@ -266,7 +266,7 @@ class UsersControllerTest < ActionController::TestCase mail = ActionMailer::Base.deliveries.last assert_not_nil mail assert_equal [u.mail], mail.bcc - assert mail.body.include?('newpass') + assert mail.body.to_s.include?('newpass') end test "put :update with a password change to an AuthSource user switching to Internal authentication" do |