diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-08-20 17:08:36 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-08-20 17:08:36 +0100 |
commit | 396b272c7f77ffe94ec5efb112e88a3c384d2db0 (patch) | |
tree | 6dd70f382bf21ec196c872de2264313468310816 /spec/models/info_request_spec.rb | |
parent | 804ce54e241f99e4e146c8c6ffded5fbb1adc790 (diff) | |
parent | f2115fe4357d232d0e8a373881790a9a38ee80f5 (diff) |
Merge branch 'develop' of github.com:sebbacon/alaveteli into develop
Diffstat (limited to 'spec/models/info_request_spec.rb')
-rw-r--r-- | spec/models/info_request_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/models/info_request_spec.rb b/spec/models/info_request_spec.rb index 98ee34381..41d01c89a 100644 --- a/spec/models/info_request_spec.rb +++ b/spec/models/info_request_spec.rb @@ -353,7 +353,7 @@ describe InfoRequest do InfoRequest.should_receive(:find).with(:all, {:select=> anything, :order=> anything, - :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 prominence != 'backpage'", + :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 and prominence != 'backpage'", true, Time.now - 21.days]}) InfoRequest.find_old_unclassified({:conditions => ["prominence != 'backpage'"]}) end @@ -362,7 +362,7 @@ describe InfoRequest do InfoRequest.should_receive(:find).with(:all, {:select=>"*, (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) as last_response_time", :order=>"last_response_time", - :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'", + :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 - 21.days]}) InfoRequest.find_old_unclassified end @@ -396,7 +396,7 @@ describe InfoRequest do end it 'should return true if it is awaiting description, isn\'t the holding pen and hasn\'t had an event in 21 days' do - @info_request.is_old_unclassified?.should be_true + (@info_request.is_external? || @info_request.is_old_unclassified?).should be_true end end |