summaryrefslogtreecommitdiffstats
path: root/test/functional/admin_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-12-03 15:39:59 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-12-03 15:39:59 +0000
commit1337fcb3d99cc870b847f74f60bd7c230dfbf8c0 (patch)
treed21a89ec1535ae3877a008882761f8f0b0432b18 /test/functional/admin_controller_test.rb
parentee5d3ab19bc336ebe902ea060dacfeeabb5014ff (diff)
downloadredmine-1337fcb3d99cc870b847f74f60bd7c230dfbf8c0.tar.gz
redmine-1337fcb3d99cc870b847f74f60bd7c230dfbf8c0.zip
Adds test for test email failure.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8056 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/admin_controller_test.rb')
-rw-r--r--test/functional/admin_controller_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/admin_controller_test.rb b/test/functional/admin_controller_test.rb
index 39f20d680..01a487798 100644
--- a/test/functional/admin_controller_test.rb
+++ b/test/functional/admin_controller_test.rb
@@ -81,6 +81,13 @@ class AdminControllerTest < ActionController::TestCase
assert_equal [user.mail], mail.bcc
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
Redmine::Plugin.clear