diff options
author | louise <louise> | 2009-04-08 16:41:52 +0000 |
---|---|---|
committer | louise <louise> | 2009-04-08 16:41:52 +0000 |
commit | f92763ecad5aa728e6de5517afd74e16af96b6c8 (patch) | |
tree | 68c0c70e14898aa9dc0fd741c83399f1af1e87c2 /spec/models | |
parent | 566427ddf41fd956122346fb813437e94a27b4c8 (diff) |
Reminders sent to users to update the status of their request now use InfoRequest.find_old_unclassified
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/request_mailer_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/models/request_mailer_spec.rb b/spec/models/request_mailer_spec.rb index 8fed44c4f..933d85870 100644 --- a/spec/models/request_mailer_spec.rb +++ b/spec/models/request_mailer_spec.rb @@ -153,8 +153,8 @@ describe RequestMailer, "when sending reminders to requesters to classify a resp RequestMailer.alert_new_response_reminders_internal(7, 'new_response_reminder_1') end - it 'should ask for all requests that are awaiting description and are not the holding pen and haven\'t been updated for the number of days given' do - expected_params = {:conditions => [ "awaiting_description = ? and info_requests.updated_at < ? and url_title != 'holding_pen'", + it 'should ask for all requests that are awaiting description and whose latest response is older than the number of days given and that are not the holding pen' do + expected_params = {:conditions => [ "awaiting_description = ? and (select created_at from info_request_events where info_request_events.info_request_id = info_requests.id and info_request_events.event_type = 'response' order by created_at desc limit 1) < ? and url_title != 'holding_pen'", true, Time.now() - 7.days ], :include => [ :user ], :order => "info_requests.id"} |