##// END OF EJS Templates
Merged r10850 from trunk (#12396)....
Jean-Philippe Lang -
r10634:8c7ae204020d
parent child
Show More
@@ -0,0 +1,10
1 Content-Type: application/ms-tnef; name="winmail.dat"
2 Content-Transfer-Encoding: binary
3 From: John Smith <JSmith@somenet.foo>
4 To: "redmine@somenet.foo" <redmine@somenet.foo>
5 Date: Fri, 1 Jun 2012 14:39:38 +0200
6 Message-ID: <87C31D42249DD0489D1A1444E3232DD7019D6183@foo.bar>
7 Accept-Language: de-CH, en-US
8 Content-Language: de-CH
9
10 Fixture
@@ -124,6 +124,7 class MailHandler < ActionMailer::Base
124 124
125 125 def dispatch
126 126 headers = [email.in_reply_to, email.references].flatten.compact
127 subject = email.subject.to_s
127 128 if headers.detect {|h| h.to_s =~ MESSAGE_ID_RE}
128 129 klass, object_id = $1, $2.to_i
129 130 method_name = "receive_#{klass}_reply"
@@ -132,9 +133,9 class MailHandler < ActionMailer::Base
132 133 else
133 134 # ignoring it
134 135 end
135 elsif m = email.subject.match(ISSUE_REPLY_SUBJECT_RE)
136 elsif m = subject.match(ISSUE_REPLY_SUBJECT_RE)
136 137 receive_issue_reply(m[1].to_i)
137 elsif m = email.subject.match(MESSAGE_REPLY_SUBJECT_RE)
138 elsif m = subject.match(MESSAGE_REPLY_SUBJECT_RE)
138 139 receive_message_reply(m[1].to_i)
139 140 else
140 141 dispatch_to_default
@@ -467,6 +467,15 class MailHandlerTest < ActiveSupport::TestCase
467 467 assert_equal ja, issue.subject
468 468 end
469 469
470 def test_add_issue_with_no_subject_header
471 issue = submit_email(
472 'no_subject_header.eml',
473 :issue => {:project => 'ecookbook'}
474 )
475 assert_kind_of Issue, issue
476 assert_equal '(no subject)', issue.subject
477 end
478
470 479 def test_add_issue_with_mixed_japanese_subject
471 480 issue = submit_email(
472 481 'subject_japanese_2.eml',
General Comments 0
You need to be logged in to leave comments. Login now