diff options
Diffstat (limited to 'spec/lib/mail_handler/mail_handler_spec.rb')
-rw-r--r-- | spec/lib/mail_handler/mail_handler_spec.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/lib/mail_handler/mail_handler_spec.rb b/spec/lib/mail_handler/mail_handler_spec.rb index aa351bd94..49a65dade 100644 --- a/spec/lib/mail_handler/mail_handler_spec.rb +++ b/spec/lib/mail_handler/mail_handler_spec.rb @@ -235,7 +235,7 @@ describe 'when deriving a name, email and formatted address from a message from it 'should quote a name with quotes in it' do should_render_from_address('"FOI \" Person" <foiperson@localhost>', - ['FOI \" Person', + ['FOI " Person', 'foiperson@localhost', '"FOI \" Person" <foiperson@localhost>']) end @@ -409,6 +409,12 @@ describe 'when getting attachment attributes' do attributes[1][:body].length.should == 7769 end + it 'should treat a document/pdf attachment as application/pdf' do + mail = get_fixture_mail('document-pdf.email') + attributes = MailHandler.get_attachment_attributes(mail) + attributes[1][:content_type].should == "application/pdf" + end + it 'should produce a consistent set of url_part_numbers, content_types, within_rfc822_subjects and filenames from an example mail with lots of attachments' do mail = get_fixture_mail('many-attachments-date-header.email') |