aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2012-09-25 15:01:01 +0100
committerLouise Crow <louise.crow@gmail.com>2012-09-25 15:01:01 +0100
commit9feb360e283f3b15e002c4b78017cdad0c1164a4 (patch)
tree5b4e07277611525b48f17ea90e466fd729909508
parent265e336ae0608af39aa3aad8b27862e572222562 (diff)
Test for the presence of the explanatory text as well when checking the response to an email to a fully closed request.
-rw-r--r--spec/models/request_mailer_spec.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/models/request_mailer_spec.rb b/spec/models/request_mailer_spec.rb
index 98681a9e9..eec362ad3 100644
--- a/spec/models/request_mailer_spec.rb
+++ b/spec/models/request_mailer_spec.rb
@@ -97,10 +97,12 @@ describe RequestMailer, " when receiving incoming mail" do
# check attached bounce is good copy of incoming-request-plain.email
mail.multipart?.should == true
mail.parts.size.should == 2
+ message_part = mail.parts[0].to_s
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")
+ bounced_mail.body.include?("That's so totally a rubbish question").should be_true
+ message_part.include?("marked to no longer receive responses").should be_true
deliveries.clear
end
@@ -324,3 +326,4 @@ describe RequestMailer, 'when sending mail when someone has updated an old uncla
end
end
+