From 19e192b2c6fd2edc49f86868f57e2a5f30c9f1b0 Mon Sep 17 00:00:00 2001 From: Seb Bacon Date: Thu, 5 Jan 2012 14:42:45 +0000 Subject: Ensure attachments have been parsed before generating cached extracts --- spec/models/incoming_message_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'spec/models/incoming_message_spec.rb') diff --git a/spec/models/incoming_message_spec.rb b/spec/models/incoming_message_spec.rb index 08d3d89f7..f514d6546 100644 --- a/spec/models/incoming_message_spec.rb +++ b/spec/models/incoming_message_spec.rb @@ -31,6 +31,13 @@ describe IncomingMessage, " when dealing with incoming mail" do end end + it "should ensure cached body text has been parsed correctly" do + ir = info_requests(:fancy_dog_request) + receive_incoming_mail('quoted-subject-iso8859-1.email', ir.incoming_email) + message = ir.incoming_messages[1] + message.get_main_body_text_unfolded.should_not include("Email has no body") + end + it "should correctly convert HTML even when there's a meta tag asserting that it is iso-8859-1 which would normally confuse elinks" do ir = info_requests(:fancy_dog_request) receive_incoming_mail('quoted-subject-iso8859-1.email', ir.incoming_email) -- cgit v1.2.3