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
This commit is contained in:
Jean-Philippe Lang
2015-06-15 21:47:22 +00:00
parent 3ae42cb326
commit 95f7471e9c
5 changed files with 59 additions and 2 deletions

View File

@@ -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