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:
parent
4d50416cdd
commit
6c0d1b66c1
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue