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:
@@ -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={})
|
||||
|
||||
Reference in New Issue
Block a user