mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Fix string/integer issues in states controller spec
This commit is contained in:
@@ -33,14 +33,14 @@ module Api
|
||||
end
|
||||
|
||||
it "paginates when page parameter is passed through" do
|
||||
expect(@scope).to receive(:page).with(1).and_return(@scope)
|
||||
expect(@scope).to receive(:page).with("1").and_return(@scope)
|
||||
expect(@scope).to receive(:per).with(nil)
|
||||
api_get :index, page: 1
|
||||
end
|
||||
|
||||
it "paginates when per_page parameter is passed through" do
|
||||
expect(@scope).to receive(:page).with(nil).and_return(@scope)
|
||||
expect(@scope).to receive(:per).with(25)
|
||||
expect(@scope).to receive(:per).with("25")
|
||||
api_get :index, per_page: 25
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user