Add and apply Rails/ResponseParsedBody rubocop rule
This rule was introduced in rubocop-rails 2.18.0. Since using `response.parsed_body` is shorter than using `JSON.parse(response.body)`, this also means we can group some lines in one.
This commit is contained in:
@@ -22,8 +22,8 @@ describe InstallationController, type: :request do
|
||||
get "/consul.json"
|
||||
|
||||
expect(response).to have_http_status(:ok)
|
||||
expect(JSON.parse(response.body)["release"]).not_to be_empty
|
||||
expect(JSON.parse(response.body)["features"]).to eq(test_process_settings)
|
||||
expect(response.parsed_body["release"]).not_to be_empty
|
||||
expect(response.parsed_body["features"]).to eq(test_process_settings)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user