From 401f44b19bbe9defca7623fdf5436b94d06def83 Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Tue, 4 Nov 2014 15:16:01 +0000 Subject: Add fix for Apple Mail with attachments --- spec/lib/mail_handler/mail_handler_spec.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'spec/lib/mail_handler/mail_handler_spec.rb') diff --git a/spec/lib/mail_handler/mail_handler_spec.rb b/spec/lib/mail_handler/mail_handler_spec.rb index ffc40ced9..e7ad93300 100644 --- a/spec/lib/mail_handler/mail_handler_spec.rb +++ b/spec/lib/mail_handler/mail_handler_spec.rb @@ -346,6 +346,12 @@ describe 'when getting attachment attributes' do attributes[0][:body].is_utf8?.should == true end + it 'should get multiple attachments from a multipart mail with text and HTML alternatives, which should be UTF-8' do + mail = get_fixture_mail('apple-mail-with-attachments.email') + attributes = MailHandler.get_attachment_attributes(mail) + attributes.length.should == 7 + end + it 'should expand a mail attached as text' do # Note that this spec will only pass using Tmail in the timezone set as datetime headers # are rendered out in the local time - using the Mail gem this is not necessary -- cgit v1.2.3