aboutsummaryrefslogtreecommitdiffstats
path: root/spec/lib/mail_handler/mail_handler_spec.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-07-29 11:08:21 +0100
committerLouise Crow <louise.crow@gmail.com>2013-07-29 11:08:21 +0100
commitb17910d494ae1a459c83b43e4b668ca4e80fc680 (patch)
tree124334762f145918456f668ccea65ae824939132 /spec/lib/mail_handler/mail_handler_spec.rb
parent1c9b3a8a4a441287cd607bb753661710f16a083a (diff)
parentd12c1e0ae5fc9a4beca05d62166a41ef6e657203 (diff)
Merge branch 'hotfix/0.12.0.1' into rails-3-develop
Conflicts: locale/he_IL/app.po locale/nb_NO/app.po
Diffstat (limited to 'spec/lib/mail_handler/mail_handler_spec.rb')
-rw-r--r--spec/lib/mail_handler/mail_handler_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/lib/mail_handler/mail_handler_spec.rb b/spec/lib/mail_handler/mail_handler_spec.rb
index 241ce06c1..aa351bd94 100644
--- a/spec/lib/mail_handler/mail_handler_spec.rb
+++ b/spec/lib/mail_handler/mail_handler_spec.rb
@@ -9,6 +9,13 @@ end
describe 'when creating a mail object from raw data' do
+ it "should be able to parse a large email without raising an exception", :focus => true do
+ m = Mail.new
+ m.add_file(:filename => "attachment.data", :content => "a" * (8 * 1024 * 1024))
+ raw_email = "From jamis_buck@byu.edu Mon May 2 16:07:05 2005\r\n#{m.to_s}"
+ lambda { Mail::Message.new(raw_email) }.should_not raise_error
+ end
+
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