Adds helpers for testing email body.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9086 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user