From 3ffcf940f089f0d3c6a8cc9ca8c88803010bc415 Mon Sep 17 00:00:00 2001 From: Francis Irving Date: Fri, 4 Dec 2009 02:24:21 +0000 Subject: Correctly take delivery of mail in new test --- spec/lib/tmail_extensions_spec.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'spec/lib/tmail_extensions_spec.rb') diff --git a/spec/lib/tmail_extensions_spec.rb b/spec/lib/tmail_extensions_spec.rb index 7b9e1b495..1c913283a 100644 --- a/spec/lib/tmail_extensions_spec.rb +++ b/spec/lib/tmail_extensions_spec.rb @@ -1,4 +1,5 @@ -# This is a test of the monkey patches in lib/fcgi_fixes.rb +# This is a test of the set_content_type monkey patch in +# lib/tmail_extensions.rb require File.dirname(__FILE__) + '/../spec_helper' @@ -10,6 +11,11 @@ describe "when using TMail" do receive_incoming_mail("humberside-police-odd-mime-type.email", 'dummy') InfoRequest.holding_pen_request.incoming_messages.size.should == 1 + # clear the notification of new message in holding pen + deliveries = ActionMailer::Base.deliveries + deliveries.size.should == 1 + deliveries.clear + incoming_message = InfoRequest.holding_pen_request.incoming_messages[0] # This will raise an error if the bug in TMail hasn't been fixed -- cgit v1.2.3