correct exception handling, always do to_i in array

This commit is contained in:
Sam
2018-08-15 11:31:42 +10:00
parent 1172e141cd
commit 06f82a7d72
2 changed files with 7 additions and 2 deletions

View File

@ -30,6 +30,11 @@ RSpec.describe ListController do
expect(response.status).to eq(400)
end
it "returns 200 for legit requests" do
get "/latest.json?exclude_category_ids%5B%5D=69&exclude_category_ids%5B%5D=70&no_definitions=true&no_subcategories=false&page=1&_=1534296100767"
expect(response.status).to eq(200)
end
it "doesn't throw an error with page params as an array" do
get "/#{Discourse.anonymous_filters[1]}", params: { page: ['7'] }
expect(response.status).to eq(200)