summaryrefslogtreecommitdiffstats
path: root/test/unit/mail_handler_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-08-26 09:03:17 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-08-26 09:03:17 +0000
commit5969df81424968af69cc7b584242d48bf7d5c51e (patch)
tree88488b73617fc90f18871cc2a622306f95ee4854 /test/unit/mail_handler_test.rb
parent2ed4364c8a15b9f557bf349894395f83955e9934 (diff)
downloadredmine-5969df81424968af69cc7b584242d48bf7d5c51e.tar.gz
redmine-5969df81424968af69cc7b584242d48bf7d5c51e.zip
MailHandler: Match assignee on the full display name (#11552).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10236 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/mail_handler_test.rb')
-rw-r--r--test/unit/mail_handler_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb
index 32646fcdd..49b5d896f 100644
--- a/test/unit/mail_handler_test.rb
+++ b/test/unit/mail_handler_test.rb
@@ -194,6 +194,16 @@ class MailHandlerTest < ActiveSupport::TestCase
assert_equal '2', issue.custom_field_value(field)
end
+ def test_add_issue_should_match_assignee_on_display_name
+ user = User.generate!(:firstname => 'Foo Bar', :lastname => 'Foo Baz')
+ User.add_to_project(user, Project.find(2))
+ issue = submit_email('ticket_on_given_project.eml') do |email|
+ email.sub!(/^Assigned to.*$/, 'Assigned to: Foo Bar Foo baz')
+ end
+ assert issue.is_a?(Issue)
+ assert_equal user, issue.assigned_to
+ end
+
def test_add_issue_with_cc
issue = submit_email('ticket_with_cc.eml', :issue => {:project => 'ecookbook'})
assert issue.is_a?(Issue)