1
0
Fork 0
mirror of https://github.com/kaminari/kaminari.git synced 2022-11-09 13:44:37 -05:00

specs for setting PaginatableArray#total_count

This commit is contained in:
Akira Matsuda 2011-08-25 12:13:46 +09:00
parent 4d50416cdd
commit 6c0d1b66c1

View file

@ -104,4 +104,11 @@ describe Kaminari::PaginatableArray do
its(:count) { should == 25 }
end
end
context 'when setting total count explicitly' do
subject { Kaminari::PaginatableArray.new((1..100).to_a, :total_count => 9999).page(5).per(10) }
it { should have(10).items }
its(:first) { should == 41 }
its(:total_count) { should == 9999 }
end
end