diff options
Diffstat (limited to 'test/unit/mail_handler_test.rb')
-rw-r--r-- | test/unit/mail_handler_test.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index 7e0f80cf3..785d16ffd 100644 --- a/test/unit/mail_handler_test.rb +++ b/test/unit/mail_handler_test.rb @@ -501,13 +501,21 @@ class MailHandlerTest < ActiveSupport::TestCase assert_equal 'd8e8fca2dc0f896fd7cb4cb0031ba249', attachment.digest end - def test_multiple_text_parts + def test_multiple_inline_text_parts_should_be_appended_to_issue_description issue = submit_email('multiple_text_parts.eml', :issue => {:project => 'ecookbook'}) assert_include 'first', issue.description assert_include 'second', issue.description assert_include 'third', 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 + attachment = issue.attachments.detect {|a| a.filename == 'textfile.txt'} + assert_not_nil attachment + assert_include 'Plain text attachment', File.read(attachment.diskfile) + end + def test_add_issue_with_iso_8859_1_subject issue = submit_email( 'subject_as_iso-8859-1.eml', |