diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-10-23 09:05:18 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-10-23 15:31:30 +0100 |
commit | 59a7d94010d54c5883f967f0d3f4aeeac7fc2ae8 (patch) | |
tree | 0cb570938774278860ce3c0ff9f4be4a54dd3e24 /spec/controllers/request_controller_spec.rb | |
parent | 01b8c844964094e989235f2c766c79ac4d36df0c (diff) |
Add extra checks from https://github.com/mysociety/alaveteli/commit/cdb1c9420169ed6eafdd4e57ca21e1809c95e5cb and some extra description.
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r-- | spec/controllers/request_controller_spec.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb index 5867c994f..1f79b0ef1 100644 --- a/spec/controllers/request_controller_spec.rb +++ b/spec/controllers/request_controller_spec.rb @@ -1709,15 +1709,17 @@ describe RequestController, "sending overdue request alerts" do 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 + it "should send not actually send the overdue alert if the user is banned but should + record it as sent" do user = info_requests(:naughty_chicken_request).user user.ban_text = 'Banned' user.save! - + UserInfoRequestSentAlert.find_all_by_user_id(user.id).count.should == 0 RequestMailer.alert_overdue_requests deliveries = ActionMailer::Base.deliveries deliveries.size.should == 0 + UserInfoRequestSentAlert.find_all_by_user_id(user.id).count.should > 0 end it "should send a very overdue alert mail to creators of very overdue requests" do |