diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-12-13 17:27:39 +0000 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-12-13 17:27:39 +0000 |
commit | 4075d5a70a6e08c1d55e97dbfc13fda4a2faaf84 (patch) | |
tree | f46f09858bc4140394e60fe0f37a8ee15a8d134a /spec/models/incoming_message_spec.rb | |
parent | 8405aeefaf1b4f72e1bc781995547d775e8991d7 (diff) |
Further improvements to attachment caching
Diffstat (limited to 'spec/models/incoming_message_spec.rb')
-rw-r--r-- | spec/models/incoming_message_spec.rb | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/spec/models/incoming_message_spec.rb b/spec/models/incoming_message_spec.rb index 4d64206e1..417a9b06c 100644 --- a/spec/models/incoming_message_spec.rb +++ b/spec/models/incoming_message_spec.rb @@ -336,16 +336,13 @@ describe IncomingMessage, " when uudecoding bad messages" do mail_body = load_file_fixture('incoming-request-bad-uuencoding.email') mail = TMail::Mail.parse(mail_body) mail.base64_decode - im = incoming_messages(:useless_incoming_message) im.stub!(:mail).and_return(mail) - -require 'ruby-debug' -debugger im.extract_attachments! - attachments = im.get_main_body_text_uudecode_attachments - attachments.size.should == 1 - attachments[0].filename.should == 'moo.txt' + attachments = im.foi_attachments + attachments.size.should == 2 + attachments[1].filename.should == 'moo.txt' + im.get_attachments_for_display.size.should == 1 end it "should apply censor rules" do @@ -365,7 +362,7 @@ debugger ir.censor_rules << @censor_rule im.extract_attachments! - attachments = im.get_main_body_text_uudecode_attachments + attachments = im.get_attachments_for_display attachments.size.should == 1 attachments[0].display_filename.should == 'bah.txt' end |