mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-14 04:04:23 +00:00
Merge pull request #6605 from PauloVilarinho/refactor-pagination-data
Refactor pagination data
This commit is contained in:
@@ -18,20 +18,4 @@ describe SearchOrders do
|
||||
expect(service.orders.count).to eq 3
|
||||
end
|
||||
end
|
||||
|
||||
describe '#pagination_data' do
|
||||
let(:params) { { per_page: 15, page: 1 } }
|
||||
let(:service) { SearchOrders.new(params, enterprise_user) }
|
||||
|
||||
it 'returns pagination data' do
|
||||
pagination_data = {
|
||||
results: 3,
|
||||
pages: 1,
|
||||
page: 1,
|
||||
per_page: 15
|
||||
}
|
||||
|
||||
expect(service.pagination_data).to eq pagination_data
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user