1 require 'abstract_unit'
3 class TMailMailTest
< Test
::Unit::TestCase
6 expected
= 'something_with_underscores'
7 m
.encoding
= 'quoted-printable'
8 quoted_body
= [expected
].pack('*M')
10 assert_equal
"something_with_underscores=\n", m
.quoted_body
11 assert_equal expected
, m
.body
14 def test_nested_attachments_are_recognized_correctly
15 fixture
= File
.read("#{File.dirname(__FILE__)}/fixtures/raw_email_with_nested_attachment")
16 mail
= TMail
::Mail.parse(fixture
)
17 assert_equal
2, mail
.attachments
.length
18 assert_equal
"image/png", mail
.attachments
.first
.content_type
19 assert_equal
1902, mail
.attachments
.first
.length
20 assert_equal
"application/pkcs7-signature", mail
.attachments
.last
.content_type