aboutsummaryrefslogtreecommitdiffstats
path: root/spec/lib/mail_handler
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2012-11-15 11:07:48 +0000
committerLouise Crow <louise.crow@gmail.com>2012-11-15 11:31:00 +0000
commitca7bb3d9f7f7e38ca670dee4352a6c81e2b9d19a (patch)
tree9bdf24417bfc5d8564e39e1b20cf782f770d4335 /spec/lib/mail_handler
parentbe5e69a7dccaa6c76408f9b7883980bd79bdba28 (diff)
Move TMail monkey patch to MailHandler Tmail backend.
Diffstat (limited to 'spec/lib/mail_handler')
-rw-r--r--spec/lib/mail_handler/mail_handler_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/lib/mail_handler/mail_handler_spec.rb b/spec/lib/mail_handler/mail_handler_spec.rb
new file mode 100644
index 000000000..fa29132bc
--- /dev/null
+++ b/spec/lib/mail_handler/mail_handler_spec.rb
@@ -0,0 +1,16 @@
+# coding: utf-8
+require File.expand_path(File.dirname(__FILE__) + '../../../spec_helper')
+
+def get_fixture_mail(filename)
+ MailHandler.mail_from_raw_email(load_file_fixture(filename))
+end
+
+describe 'when creating a mail object from raw data' do
+
+ it 'should correctly parse a multipart email with a linebreak in the boundary' do
+ mail = get_fixture_mail('space-boundary.email')
+ mail.parts.size.should == 2
+ mail.multipart?.should == true
+ end
+
+end