parent
d79c94626c
commit
03fe8ba9b0
|
@ -58,6 +58,11 @@ if defined? ActiveRecord
|
|||
it { should have(5).users }
|
||||
its('first.name') { should == 'user001' }
|
||||
end
|
||||
|
||||
context "page 1 per nil (using default)" do
|
||||
subject { model_class.page(1).per(nil) }
|
||||
it { should have(model_class.default_per_page).users }
|
||||
end
|
||||
end
|
||||
|
||||
describe '#padding' do
|
||||
|
@ -124,6 +129,11 @@ if defined? ActiveRecord
|
|||
subject { model_class.page }
|
||||
its(:total_pages) { should == 4 }
|
||||
end
|
||||
|
||||
context "with per(nil) using default" do
|
||||
subject { model_class.page.per(nil) }
|
||||
its(:total_pages) { should == 4 }
|
||||
end
|
||||
end
|
||||
|
||||
describe '#current_page' do
|
||||
|
|
Loading…
Reference in New Issue