diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-11-15 14:04:55 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-11-15 14:05:33 +0000 |
commit | 4bdab94e9d4f0a64647e5f8534c1fea8b4ba2809 (patch) | |
tree | 6071f4273cb98cedf1bfd54b7a415ac1717fce00 /spec/models | |
parent | 8834f67db8cd94a0285dd1bb4702db834e08e995 (diff) |
Move TMail extensions to mail handler.
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/incoming_message_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/models/incoming_message_spec.rb b/spec/models/incoming_message_spec.rb index 2ae98564c..fdbcd1e23 100644 --- a/spec/models/incoming_message_spec.rb +++ b/spec/models/incoming_message_spec.rb @@ -85,6 +85,26 @@ describe IncomingMessage, " when dealing with incoming mail" do end end + + it "should load an email with funny MIME settings" do + ActionMailer::Base.deliveries.clear + # just send it to the holding pen + InfoRequest.holding_pen_request.incoming_messages.size.should == 0 + 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 + incoming_message.get_body_for_html_display() + end + + end describe IncomingMessage, "when parsing HTML mail" do |