summaryrefslogtreecommitdiffstats
path: root/test/functional/users_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-03-04 13:28:18 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-03-04 13:28:18 +0000
commit3aaf2b9ed00751d0aa793c98861513ac5302ec10 (patch)
treed497313144509b6bb0a43c2a10e395424549dcfe /test/functional/users_controller_test.rb
parentb1d5f42237295895412ff559f3f65a05cd65cf96 (diff)
downloadredmine-3aaf2b9ed00751d0aa793c98861513ac5302ec10.tar.gz
redmine-3aaf2b9ed00751d0aa793c98861513ac5302ec10.zip
Adds helpers for testing email body.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9086 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/users_controller_test.rb')
-rw-r--r--test/functional/users_controller_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb
index ca805d4a1..11e5acc3c 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_match 'secret', mail
end
def test_create_with_preferences
@@ -279,7 +279,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_match ll('fr', :notice_account_activated), mail
end
def test_update_with_password_change_should_send_a_notification
@@ -293,7 +293,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_match 'newpass', mail
end
test "put :update with a password change to an AuthSource user switching to Internal authentication" do