aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Houston <robin.houston@gmail.com>2012-08-20 08:18:03 +0100
committerRobin Houston <robin.houston@gmail.com>2012-08-20 08:18:03 +0100
commitba97fffe11b02275a9b3619716744dca7fe9580b (patch)
tree836daa2e60c5e3019f82276f7582546b862416d9
parent99457f15722b3326ba11ecb3003c3dd50b70a9c4 (diff)
Fix another test
Is there actually any point in tests of this sort? It is not testing that anything works as intended, only that a particular SQL string is passed to the database -- and surely the only way that string could have been discovered for test purposes was essentially to copy it from the code under test. It seems to me that the only real function of a test of this sort is to make it more difficult to modify the code under test.
-rw-r--r--spec/models/request_mailer_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/models/request_mailer_spec.rb b/spec/models/request_mailer_spec.rb
index 64ac35cf7..ea75ec765 100644
--- a/spec/models/request_mailer_spec.rb
+++ b/spec/models/request_mailer_spec.rb
@@ -223,7 +223,7 @@ describe RequestMailer, "when sending reminders to requesters to classify a resp
end
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'",
+ 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' and user_id is not null",
true, Time.now() - 7.days ],
:include => [ :user ],
:order => "info_requests.id"}