Autofix Rubocop Rails/ResponseParsedBody (#24051)
This commit is contained in:
@@ -41,7 +41,7 @@ describe FollowerAccountsController do
|
||||
context 'when format is json' do
|
||||
subject(:response) { get :index, params: { account_username: alice.username, page: page, format: :json } }
|
||||
|
||||
subject(:body) { JSON.parse(response.body) }
|
||||
subject(:body) { response.parsed_body }
|
||||
|
||||
context 'with page' do
|
||||
let(:page) { 1 }
|
||||
|
@@ -41,7 +41,7 @@ describe FollowingAccountsController do
|
||||
context 'when format is json' do
|
||||
subject(:response) { get :index, params: { account_username: alice.username, page: page, format: :json } }
|
||||
|
||||
subject(:body) { JSON.parse(response.body) }
|
||||
subject(:body) { response.parsed_body }
|
||||
|
||||
context 'with page' do
|
||||
let(:page) { 1 }
|
||||
|
@@ -140,7 +140,7 @@ describe Settings::TwoFactorAuthentication::WebauthnCredentialsController do
|
||||
it 'includes existing credentials in list of excluded credentials' do
|
||||
get :options
|
||||
|
||||
excluded_credentials_ids = JSON.parse(response.body)['excludeCredentials'].pluck('id')
|
||||
excluded_credentials_ids = response.parsed_body['excludeCredentials'].pluck('id')
|
||||
expect(excluded_credentials_ids).to match_array(user.webauthn_credentials.pluck(:external_id))
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user