Adds test for test email failure.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8056 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2011-12-03 15:39:59 +00:00
parent ee5d3ab19b
commit 1337fcb3d9
1 changed files with 7 additions and 0 deletions

View File

@ -81,6 +81,13 @@ class AdminControllerTest < ActionController::TestCase
assert_equal [user.mail], mail.bcc assert_equal [user.mail], mail.bcc
end end
def test_test_email_failure_should_display_the_error
Mailer.stubs(:deliver_test).raises(Exception, 'Some error message')
get :test_email
assert_redirected_to '/settings/edit?tab=notifications'
assert_match /Some error message/, flash[:error]
end
def test_no_plugins def test_no_plugins
Redmine::Plugin.clear Redmine::Plugin.clear