summaryrefslogtreecommitdiffstats
path: root/test/functional/admin_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-06-29 16:09:00 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-06-29 16:09:00 +0000
commit670340e543cecafbd7c6f89e3113d7b06858e0bb (patch)
treeb984411f79aa783d903c16e0cfe87b7beff0d6b1 /test/functional/admin_controller_test.rb
parent004fc8b84b1cebc521664ca3830f969a91244e67 (diff)
downloadredmine-670340e543cecafbd7c6f89e3113d7b06858e0bb.tar.gz
redmine-670340e543cecafbd7c6f89e3113d7b06858e0bb.zip
The test email action should only be accessible with POST (#20203).
git-svn-id: http://svn.redmine.org/redmine/trunk@14389 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/admin_controller_test.rb')
-rw-r--r--test/functional/admin_controller_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/admin_controller_test.rb b/test/functional/admin_controller_test.rb
index bef3e4284..3064d5faa 100644
--- a/test/functional/admin_controller_test.rb
+++ b/test/functional/admin_controller_test.rb
@@ -87,7 +87,7 @@ class AdminControllerTest < ActionController::TestCase
user.pref.save!
ActionMailer::Base.deliveries.clear
- get :test_email
+ post :test_email
assert_redirected_to '/settings?tab=notifications'
mail = ActionMailer::Base.deliveries.last
assert_not_nil mail
@@ -97,7 +97,7 @@ class AdminControllerTest < ActionController::TestCase
def test_test_email_failure_should_display_the_error
Mailer.stubs(:test_email).raises(Exception, 'Some error message')
- get :test_email
+ post :test_email
assert_redirected_to '/settings?tab=notifications'
assert_match /Some error message/, flash[:error]
end