aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-01-29 13:33:29 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-01-29 13:33:29 +1100
commit531698075c2d20232f110f64a95f705b5bf686f0 (patch)
tree54ec5e066712aaac64cbcbb2d8bac04b3c576c07
parent166b6d90bc2dc79536d8d2d145281fa340075735 (diff)
When matching the body of an email to a regex cast it to a string
-rw-r--r--spec/controllers/request_controller_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index 11175542e..6a012d2b9 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -1731,7 +1731,7 @@ describe RequestController, "sending overdue request alerts" do
mail.body.should =~ /promptly, as normally/
mail.to_addrs.first.to_s.should == info_requests(:naughty_chicken_request).user.email
- mail.body =~ /(http:\/\/.*\/c\/(.*))/
+ mail.body.to_s =~ /(http:\/\/.*\/c\/(.*))/
mail_url = $1
mail_token = $2
@@ -1788,7 +1788,7 @@ describe RequestController, "sending overdue request alerts" do
mail.body.should =~ /required by law/
mail.to_addrs.first.to_s.should == info_requests(:naughty_chicken_request).user.email
- mail.body =~ /(http:\/\/.*\/c\/(.*))/
+ mail.body.to_s =~ /(http:\/\/.*\/c\/(.*))/
mail_url = $1
mail_token = $2
@@ -1871,7 +1871,7 @@ describe RequestController, "sending unclassified new response reminder alerts"
mail = deliveries[0]
mail.body.should =~ /To let everyone know/
mail.to_addrs.first.to_s.should == info_requests(:fancy_dog_request).user.email
- mail.body =~ /(http:\/\/.*\/c\/(.*))/
+ mail.body.to_s =~ /(http:\/\/.*\/c\/(.*))/
mail_url = $1
mail_token = $2
@@ -1908,7 +1908,7 @@ describe RequestController, "clarification required alerts" do
mail = deliveries[0]
mail.body.should =~ /asked you to explain/
mail.to_addrs.first.to_s.should == info_requests(:fancy_dog_request).user.email
- mail.body =~ /(http:\/\/.*\/c\/(.*))/
+ mail.body.to_s =~ /(http:\/\/.*\/c\/(.*))/
mail_url = $1
mail_token = $2
@@ -1962,7 +1962,7 @@ describe RequestController, "comment alerts" do
mail = deliveries[0]
mail.body.should =~ /has annotated your/
mail.to_addrs.first.to_s.should == info_requests(:fancy_dog_request).user.email
- mail.body =~ /(http:\/\/.*)/
+ mail.body.to_s =~ /(http:\/\/.*)/
mail_url = $1
mail_url.should match("/request/why_do_you_have_such_a_fancy_dog#comment-#{new_comment.id}")
@@ -2012,7 +2012,7 @@ describe RequestController, "comment alerts" do
mail = deliveries[0]
mail.body.should =~ /There are 2 new annotations/
mail.to_addrs.first.to_s.should == info_requests(:fancy_dog_request).user.email
- mail.body =~ /(http:\/\/.*)/
+ mail.body.to_s =~ /(http:\/\/.*)/
mail_url = $1
mail_url.should match("/request/why_do_you_have_such_a_fancy_dog#comment-#{comments(:silly_comment).id}")