summaryrefslogtreecommitdiffstats
path: root/test/unit/mail_handler_test.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-03-03 13:00:07 +0000
committerGo MAEDA <maeda@farend.jp>2019-03-03 13:00:07 +0000
commit472ea478082021a5139982e50cf6be8c01c8e93c (patch)
tree2d18432830dd5dbf5ef2773e7e7f6158b4e6ae15 /test/unit/mail_handler_test.rb
parent3ce803e82bc6d35718c6711f19b2260e039cc726 (diff)
downloadredmine-472ea478082021a5139982e50cf6be8c01c8e93c.tar.gz
redmine-472ea478082021a5139982e50cf6be8c01c8e93c.zip
Test for r17914 (#17699).
git-svn-id: http://svn.redmine.org/redmine/trunk@17915 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/mail_handler_test.rb')
-rw-r--r--test/unit/mail_handler_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb
index e5d009633..adc4b71cf 100644
--- a/test/unit/mail_handler_test.rb
+++ b/test/unit/mail_handler_test.rb
@@ -1193,6 +1193,20 @@ class MailHandlerTest < ActiveSupport::TestCase
assert_equal str2, user.lastname
end
+ def test_new_user_with_fullname_in_parentheses
+ assert_difference 'User.count' do
+ issue = submit_email(
+ 'fullname_of_sender_in_parentheses.eml',
+ :issue => {:project => 'ecookbook'},
+ :unknown_user => 'create'
+ )
+ end
+ user = User.order('id DESC').first
+ assert_equal "jdoe@example.net", user.mail
+ assert_equal 'John', user.firstname
+ assert_equal 'Doe', user.lastname
+ end
+
def test_extract_options_from_env_should_return_options
options = MailHandler.extract_options_from_env({
'tracker' => 'defect',