Adds a method for extracting MailHandler options from ENV.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11785 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2013-05-04 07:32:35 +00:00
parent 33afeea87a
commit ed18b3359b
3 changed files with 29 additions and 27 deletions
+13
View File
@@ -798,6 +798,19 @@ class MailHandlerTest < ActiveSupport::TestCase
assert_equal str2, user.lastname
end
def test_extract_options_from_env_should_return_options
options = MailHandler.extract_options_from_env({
'tracker' => 'defect',
'project' => 'foo',
'unknown_user' => 'create'
})
assert_equal({
:issue => {:tracker => 'defect', :project => 'foo'},
:unknown_user => 'create'
}, options)
end
private
def submit_email(filename, options={})