diff options
author | francis <francis> | 2009-06-15 16:01:49 +0000 |
---|---|---|
committer | francis <francis> | 2009-06-15 16:01:49 +0000 |
commit | fa745d2c5df81a212a03fce6a67d740050085428 (patch) | |
tree | 400ab15e67da368163bec9b4181f0fc1f55a5122 /spec/models | |
parent | ece5cadc258d5637e34f57de421e1020697cc409 (diff) |
Fix bug with bouncing messages.
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/request_mailer_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/models/request_mailer_spec.rb b/spec/models/request_mailer_spec.rb index bd91fb778..5d901dfed 100644 --- a/spec/models/request_mailer_spec.rb +++ b/spec/models/request_mailer_spec.rb @@ -50,6 +50,13 @@ describe RequestMailer, " when receiving incoming mail" do deliveries.size.should == 1 mail = deliveries[0] mail.to.should == [ 'geraldinequango@localhost' ] + # check attached bounce is good copy of incoming-request-plain.email + mail.multipart?.should == true + mail.parts.size.should == 2 + bounced_mail = TMail::Mail.parse(mail.parts[1].body) + bounced_mail.to.should == [ ir.incoming_email ] + bounced_mail.from.should == [ 'geraldinequango@localhost' ] + bounced_mail.body.include?("That's so totally a rubbish question") deliveries.clear end |