Accept replies to forum messages by subject recognition (#1616).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2294 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2009-01-21 18:22:30 +00:00
parent b80caf762a
commit dfab202cde
4 changed files with 28 additions and 3 deletions
+13
View File
@@ -0,0 +1,13 @@
Message-ID: <4974C93E.3070005@somenet.foo>
Date: Mon, 19 Jan 2009 19:41:02 +0100
From: "John Smith" <jsmith@somenet.foo>
User-Agent: Thunderbird 2.0.0.19 (Windows/20081209)
MIME-Version: 1.0
To: redmine@somenet.foo
Subject: Re: [eCookbook - Help board - msg2] Reply to the first post
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
This is a reply to a forum message.
+9
View File
@@ -153,6 +153,15 @@ class MailHandlerTest < Test::Unit::TestCase
assert_equal Message.find(1), m.parent
end
def test_reply_to_a_message_by_subject
m = submit_email('message_reply_by_subject.eml')
assert m.is_a?(Message)
assert !m.new_record?
m.reload
assert_equal 'Reply to the first post', m.subject
assert_equal Message.find(1), m.parent
end
def test_should_strip_tags_of_html_only_emails
issue = submit_email('ticket_html_only.eml', :issue => {:project => 'ecookbook'})
assert issue.is_a?(Issue)