summaryrefslogtreecommitdiffstats
path: root/test/unit/mail_handler_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-01-17 14:14:12 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-01-17 14:14:12 +0000
commite3618bdbecd9b5d86eb6d2c8c256ba3fcdf05189 (patch)
tree3b54c10eecece6cc2674491a76a4e5e932d82d1e /test/unit/mail_handler_test.rb
parent7f29c2fd88f271ac59f1c10b90942fec57b35ae2 (diff)
downloadredmine-e3618bdbecd9b5d86eb6d2c8c256ba3fcdf05189.tar.gz
redmine-e3618bdbecd9b5d86eb6d2c8c256ba3fcdf05189.zip
Add support for multiple email addresses per user (#4244).
git-svn-id: http://svn.redmine.org/redmine/trunk@13886 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/mail_handler_test.rb')
-rw-r--r--test/unit/mail_handler_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb
index a8a7846ba..bc7e0a0d0 100644
--- a/test/unit/mail_handler_test.rb
+++ b/test/unit/mail_handler_test.rb
@@ -223,6 +223,17 @@ class MailHandlerTest < ActiveSupport::TestCase
assert_equal 1, issue.watcher_user_ids.size
end
+ def test_add_issue_from_additional_email_address
+ user = User.find(2)
+ user.mail = 'mainaddress@somenet.foo'
+ user.save!
+ EmailAddress.create!(:user => user, :address => 'jsmith@somenet.foo')
+
+ issue = submit_email('ticket_on_given_project.eml')
+ assert issue
+ assert_equal user, issue.author
+ end
+
def test_add_issue_by_unknown_user
assert_no_difference 'User.count' do
assert_equal false,