diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-12-21 16:39:29 +0000 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-12-21 16:39:29 +0000 |
commit | 37b2fb482d31f77865bb889c049450d72876df92 (patch) | |
tree | 6f1d3fb4d215f069995634907f2bb32e9220ac22 /spec/models/incoming_message_spec.rb | |
parent | 757e5cb8a4fc25ddacde849747da2f3e41dd7e73 (diff) |
Ensure we always censor safe_mail_from; and mention new only-parse-once feature in CHANGES.md
Diffstat (limited to 'spec/models/incoming_message_spec.rb')
-rw-r--r-- | spec/models/incoming_message_spec.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/spec/models/incoming_message_spec.rb b/spec/models/incoming_message_spec.rb index 417a9b06c..ed31b7c5c 100644 --- a/spec/models/incoming_message_spec.rb +++ b/spec/models/incoming_message_spec.rb @@ -284,11 +284,9 @@ describe IncomingMessage, " when censoring data" do end it "should apply censor rules to From: addresses" do - mock_mail = mock('Email object') - mock_mail.stub!(:from_name_if_present).and_return("Stilton Mouse") - @im.stub!(:mail).and_return(mock_mail) - - safe_mail_from = @im._calculate_safe_mail_from + @im.stub!(:mail_from).and_return("Stilton Mouse") + @im.stub!(:last_parsed).and_return(Time.now) + safe_mail_from = @im.safe_mail_from safe_mail_from.should == "Jarlsberg Mouse" end |