Remove will paginate
This commit is contained in:
parent
f983fc3ea3
commit
62d8381ef7
10 changed files with 13 additions and 21 deletions
|
@ -65,7 +65,7 @@ describe API::V1::DossiersController do
|
|||
let!(:dossier2) { create(:dossier, :with_entreprise, procedure: procedure, state: 'en_construction') }
|
||||
|
||||
before do
|
||||
allow(Dossier).to receive(:per_page).and_return(1)
|
||||
allow(controller).to receive(:per_page).and_return(1)
|
||||
end
|
||||
|
||||
describe 'pagination' do
|
||||
|
|
|
@ -7,13 +7,12 @@ describe ProceduresDecorator do
|
|||
create(:procedure, :published, created_at: Time.new(2015, 12, 24, 14, 10))
|
||||
end
|
||||
|
||||
let(:procedure) { Procedure.all.paginate(page: 1) }
|
||||
let(:procedure) { Procedure.all.page(1) }
|
||||
|
||||
subject { procedure.decorate }
|
||||
|
||||
it { expect(subject.current_page).not_to be_nil }
|
||||
it { expect(subject.per_page).not_to be_nil }
|
||||
it { expect(subject.offset).not_to be_nil }
|
||||
it { expect(subject.total_entries).not_to be_nil }
|
||||
it { expect(subject.limit_value).not_to be_nil }
|
||||
it { expect(subject.count).to eq(3) }
|
||||
it { expect(subject.total_pages).not_to be_nil }
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue