diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-06-15 21:47:22 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-06-15 21:47:22 +0000 |
commit | 95f7471e9c786a7cf5700f6b078ed62ca0cf264e (patch) | |
tree | 6edc607d2cfafe012a28d404cbe1a74f10efb40c /test | |
parent | 3ae42cb32617670cb6c99a60f5cda2cf961d110c (diff) | |
download | redmine-95f7471e9c786a7cf5700f6b078ed62ca0cf264e.tar.gz redmine-95f7471e9c786a7cf5700f6b078ed62ca0cf264e.zip |
Adds a form to manually submit an email to the mail handler.
Use GET /mail_handler?key= to get the form.
git-svn-id: http://svn.redmine.org/redmine/trunk@14314 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/mail_handler_controller_test.rb | 9 | ||||
-rw-r--r-- | test/integration/routing/mail_handler_test.rb | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/test/functional/mail_handler_controller_test.rb b/test/functional/mail_handler_controller_test.rb index a966b774d..465b29c39 100644 --- a/test/functional/mail_handler_controller_test.rb +++ b/test/functional/mail_handler_controller_test.rb @@ -77,7 +77,6 @@ class MailHandlerControllerTest < ActionController::TestCase end def test_should_not_allow_with_wrong_key - # Disable API Setting.mail_handler_api_enabled = 1 Setting.mail_handler_api_key = 'secret' @@ -86,4 +85,12 @@ class MailHandlerControllerTest < ActionController::TestCase end assert_response 403 end + + def test_new + Setting.mail_handler_api_enabled = 1 + Setting.mail_handler_api_key = 'secret' + + get :new, :key => 'secret' + assert_response :success + end end diff --git a/test/integration/routing/mail_handler_test.rb b/test/integration/routing/mail_handler_test.rb index 13505c47d..d4b3e4ba4 100644 --- a/test/integration/routing/mail_handler_test.rb +++ b/test/integration/routing/mail_handler_test.rb @@ -19,6 +19,7 @@ require File.expand_path('../../../test_helper', __FILE__) class RoutingMailHandlerTest < Redmine::RoutingTest def test_mail_handler + should_route 'GET /mail_handler' => 'mail_handler#new' should_route 'POST /mail_handler' => 'mail_handler#index' end end |