Add state search spec
This commit is contained in:
@@ -17,6 +17,11 @@ RSpec.describe "Api::V1::Parks", type: :request do
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "filters by state" do
|
||||||
|
get api_v1_parks_url, params: { state: "OR" }
|
||||||
|
expect(response.parsed_body.pluck("code")).to eq(["crla"])
|
||||||
|
end
|
||||||
|
|
||||||
context "with pagination" do
|
context "with pagination" do
|
||||||
it "respects page size param" do
|
it "respects page size param" do
|
||||||
get api_v1_parks_url, params: { per_page: 1 }
|
get api_v1_parks_url, params: { per_page: 1 }
|
||||||
|
|||||||
Reference in New Issue
Block a user