aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/info_request_spec.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2012-09-13 09:59:13 +0100
committerLouise Crow <louise.crow@gmail.com>2012-09-13 09:59:13 +0100
commit7d43d1a379175a7c200e32d6046d8f7c5d203ed9 (patch)
tree09f1ccf71417529235de05693ec8f99732c9bc05 /spec/models/info_request_spec.rb
parent9a504edc1a3312159441269c7da597fe78a0c430 (diff)
Allow InfoRequest.find_old_unclassified to accept an offset param so it can be used in conjunction with pagination.
Diffstat (limited to 'spec/models/info_request_spec.rb')
-rw-r--r--spec/models/info_request_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/info_request_spec.rb b/spec/models/info_request_spec.rb
index 76be32e0c..204c600d9 100644
--- a/spec/models/info_request_spec.rb
+++ b/spec/models/info_request_spec.rb
@@ -341,6 +341,14 @@ describe InfoRequest do
InfoRequest.find_old_unclassified(:limit => 5)
end
+ it 'should ask for requests using any offset param supplied' do
+ InfoRequest.should_receive(:find).with(:all, {:select => anything,
+ :order => anything,
+ :conditions=> anything,
+ :offset => 100})
+ InfoRequest.find_old_unclassified(:offset => 100)
+ end
+
it 'should not limit the number of requests returned by default' do
InfoRequest.should_not_receive(:find).with(:all, {:select => anything,
:order => anything,