Mail parts with empty content should be ignored (#25256).

Patch by Felix Schäfer.

git-svn-id: http://svn.redmine.org/redmine/trunk@16371 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2017-03-05 08:41:20 +00:00
parent 7a60e44d43
commit a9a1f6205a
3 changed files with 51 additions and 10 deletions

View File

@@ -623,6 +623,11 @@ class MailHandlerTest < ActiveSupport::TestCase
assert_include 'third', issue.description
end
def test_empty_text_part_should_not_stop_looking_for_content
issue = submit_email('empty_text_part.eml', :issue => {:project => 'ecookbook'})
assert_equal 'The html part.', issue.description
end
def test_attachment_text_part_should_be_added_as_issue_attachment
issue = submit_email('multiple_text_parts.eml', :issue => {:project => 'ecookbook'})
assert_not_include 'Plain text attachment', issue.description