diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-11-24 10:35:49 +0000 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-11-24 10:35:49 +0000 |
commit | 8494003ebf71ef437dfccb9374366a51ecb5924c (patch) | |
tree | 88f105ebb3ebdd84b64b4b5cb5f00db5cacd9e2d /spec/controllers/request_controller_spec.rb | |
parent | fbfebdbe1c5b13f86f92404c3397d6dcb75766ce (diff) | |
parent | b7075181100852ff2117d61b02881e84deaafa87 (diff) |
Merge remote-tracking branch 'jpmckinney/pre1.9' into develop
Conflicts:
spec/controllers/request_controller_spec.rb
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r-- | spec/controllers/request_controller_spec.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb index 32e14cd52..3420d212e 100644 --- a/spec/controllers/request_controller_spec.rb +++ b/spec/controllers/request_controller_spec.rb @@ -807,7 +807,7 @@ describe RequestController, "when classifying an information request" do deliveries.size.should == 1 mail = deliveries[0] mail.body.should =~ /as needing admin/ - mail.from_addrs.to_s.should == @request_owner.name_and_email + mail.from_addrs.first.to_s.should == @request_owner.name_and_email end it 'should say it is showing advice as to what to do next' do @@ -985,7 +985,7 @@ describe RequestController, "when sending a followup message" do deliveries.size.should == 1 mail = deliveries[0] mail.body.should =~ /What a useless response! You suck./ - mail.to_addrs.to_s.should == "FOI Person <foiperson@localhost>" + mail.to_addrs.first.to_s.should == "FOI Person <foiperson@localhost>" response.should redirect_to(:action => 'show', :url_title => info_requests(:fancy_dog_request).url_title) @@ -1032,7 +1032,7 @@ describe RequestController, "sending overdue request alerts" do deliveries.size.should == 1 mail = deliveries[0] mail.body.should =~ /promptly, as normally/ - mail.to_addrs.to_s.should == info_requests(:naughty_chicken_request).user.name_and_email + mail.to_addrs.first.to_s.should == info_requests(:naughty_chicken_request).user.name_and_email mail.body =~ /(http:\/\/.*\/c\/(.*))/ mail_url = $1 @@ -1060,7 +1060,7 @@ describe RequestController, "sending overdue request alerts" do deliveries.size.should == 1 mail = deliveries[0] mail.body.should =~ /promptly, as normally/ - mail.to_addrs.to_s.should == info_requests(:naughty_chicken_request).user.name_and_email + mail.to_addrs.first.to_s.should == info_requests(:naughty_chicken_request).user.name_and_email end it "should send not actually send the overdue alert if the user is banned" do @@ -1085,7 +1085,7 @@ describe RequestController, "sending overdue request alerts" do deliveries.size.should == 1 mail = deliveries[0] mail.body.should =~ /required by law/ - mail.to_addrs.to_s.should == info_requests(:naughty_chicken_request).user.name_and_email + mail.to_addrs.first.to_s.should == info_requests(:naughty_chicken_request).user.name_and_email mail.body =~ /(http:\/\/.*\/c\/(.*))/ mail_url = $1 @@ -1116,7 +1116,7 @@ describe RequestController, "sending unclassified new response reminder alerts" deliveries.size.should == 3 # sufficiently late it sends reminders too mail = deliveries[0] mail.body.should =~ /To let us know/ - mail.to_addrs.to_s.should == info_requests(:fancy_dog_request).user.name_and_email + mail.to_addrs.first.to_s.should == info_requests(:fancy_dog_request).user.name_and_email mail.body =~ /(http:\/\/.*\/c\/(.*))/ mail_url = $1 mail_token = $2 @@ -1153,7 +1153,7 @@ describe RequestController, "clarification required alerts" do deliveries.size.should == 1 mail = deliveries[0] mail.body.should =~ /asked you to explain/ - mail.to_addrs.to_s.should == info_requests(:fancy_dog_request).user.name_and_email + mail.to_addrs.first.to_s.should == info_requests(:fancy_dog_request).user.name_and_email mail.body =~ /(http:\/\/.*\/c\/(.*))/ mail_url = $1 mail_token = $2 @@ -1207,7 +1207,7 @@ describe RequestController, "comment alerts" do deliveries = ActionMailer::Base.deliveries mail = deliveries[0] mail.body.should =~ /has annotated your/ - mail.to_addrs.to_s.should == info_requests(:fancy_dog_request).user.name_and_email + mail.to_addrs.first.to_s.should == info_requests(:fancy_dog_request).user.name_and_email mail.body =~ /(http:\/\/.*)/ mail_url = $1 @@ -1250,7 +1250,7 @@ describe RequestController, "comment alerts" do deliveries.size.should == 1 mail = deliveries[0] mail.body.should =~ /There are 2 new annotations/ - mail.to_addrs.to_s.should == info_requests(:fancy_dog_request).user.name_and_email + mail.to_addrs.first.to_s.should == info_requests(:fancy_dog_request).user.name_and_email mail.body =~ /(http:\/\/.*)/ mail_url = $1 |