mirror of
https://github.com/redmine/redmine.git
synced 2026-05-07 19:45:29 +02:00
Try importing journal replies as issue reply where applicable (#38263).
Patch by Felix Schäfer. git-svn-id: https://svn.redmine.org/redmine/trunk@22119 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -1114,6 +1114,21 @@ class MailHandlerTest < ActiveSupport::TestCase
|
||||
end
|
||||
end
|
||||
|
||||
def test_reply_to_a_nonexitent_journal_with_subject_fallback
|
||||
journal_id = Issue.find(2).journals.last.id
|
||||
Journal.destroy(journal_id)
|
||||
assert_no_difference 'Issue.count' do
|
||||
assert_difference 'Journal.count', 1 do
|
||||
journal = submit_email('ticket_reply.eml') do |email|
|
||||
email.sub! %r{^In-Reply-To:.*$}, "In-Reply-To: <redmine.journal-#{journal_id}.20060719210421@osiris>"
|
||||
email.sub! %r{^Subject:.*$}, "Subject: Re: [Feature request #2] Add ingredients categories"
|
||||
end
|
||||
assert_kind_of Journal, journal
|
||||
assert_equal Issue.find(2), journal.journalized
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def test_reply_to_a_message
|
||||
m = submit_email('message_reply.eml')
|
||||
assert m.is_a?(Message)
|
||||
|
||||
Reference in New Issue
Block a user