aboutsummaryrefslogtreecommitdiffstats
path: root/spec/lib/tmail_extensions_spec.rb
diff options
context:
space:
mode:
authorFrancis Irving <francis@mysociety.org>2009-12-03 13:22:55 +0000
committerFrancis Irving <francis@mysociety.org>2009-12-03 13:22:55 +0000
commit2eabd0bf1d5c3d0cfa0f2883f6cfd65298ef4cd1 (patch)
treece915296612a14789c43e1026b85a2b37a454654 /spec/lib/tmail_extensions_spec.rb
parent1053556b7c12d757f2e654266a855609658b2964 (diff)
Rename spec files to libs, and to end _spec
Diffstat (limited to 'spec/lib/tmail_extensions_spec.rb')
-rw-r--r--spec/lib/tmail_extensions_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/lib/tmail_extensions_spec.rb b/spec/lib/tmail_extensions_spec.rb
new file mode 100644
index 000000000..7b9e1b495
--- /dev/null
+++ b/spec/lib/tmail_extensions_spec.rb
@@ -0,0 +1,20 @@
+# This is a test of the monkey patches in lib/fcgi_fixes.rb
+
+require File.dirname(__FILE__) + '/../spec_helper'
+
+describe "when using TMail" do
+
+ it "should load an email with funny MIME settings" do
+ # 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
+
+ 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
+