tests: fix only param test.
This commit is contained in:
@@ -208,7 +208,7 @@ class ApplicationControllerTest < ActionDispatch::IntegrationTest
|
|||||||
|
|
||||||
should "support the only parameter" do
|
should "support the only parameter" do
|
||||||
create(:post)
|
create(:post)
|
||||||
get posts_path, as: :json, params: { only: "id,rating score" }
|
get posts_path, as: :json, params: { only: "id,rating,score" }
|
||||||
|
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_equal(%w[id rating score].sort, response.parsed_body.first.keys.sort)
|
assert_equal(%w[id rating score].sort, response.parsed_body.first.keys.sort)
|
||||||
|
|||||||
Reference in New Issue
Block a user