diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-11-13 10:58:52 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-12-04 12:47:20 +0000 |
commit | 2ad6b55a528ac0f747b6804157ed08acb616a437 (patch) | |
tree | 3cb60bf486f2b035a0a33d713ec6fe7f55a3c7b5 /spec/models/incoming_message_spec.rb | |
parent | 49c8a6131acbdfe151fe1ab0a0e08616865a4e08 (diff) |
Add spec for the adding of headers to plain text bodies in attachments.
Diffstat (limited to 'spec/models/incoming_message_spec.rb')
-rw-r--r-- | spec/models/incoming_message_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/models/incoming_message_spec.rb b/spec/models/incoming_message_spec.rb index 5478f6fc4..5a3f1a954 100644 --- a/spec/models/incoming_message_spec.rb +++ b/spec/models/incoming_message_spec.rb @@ -456,6 +456,19 @@ describe IncomingMessage, "when messages are attached to messages" do 'hello.txt', ] end + + it 'should add headers to attached plain text message bodies' do + mail_body = load_file_fixture('incoming-request-attachment-headers.email') + mail = MailHandler.mail_from_raw_email(mail_body) + + im = incoming_messages(:useless_incoming_message) + im.stub!(:mail).and_return(mail) + + attachments = im.get_attachments_for_display + attachments.size.should == 2 + attachments[0].body.should match('Date: Fri, 23 May 2008') + end + end describe IncomingMessage, "when Outlook messages are attached to messages" do |