0
0
Fork 0

Autofix Rubocop RSpec/MatchArray (#24050)

This commit is contained in:
Nick Schonning 2023-04-26 14:21:54 -04:00 committed by GitHub
parent 91a8cd21d8
commit a3393d0d07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 53 additions and 76 deletions

View file

@ -28,7 +28,7 @@ describe Api::V1::Accounts::FollowerAccountsController do
get :index, params: { account_id: account.id, limit: 2 }
expect(body_as_json.size).to eq 2
expect([body_as_json[0][:id], body_as_json[1][:id]]).to match_array([alice.id.to_s, bob.id.to_s])
expect([body_as_json[0][:id], body_as_json[1][:id]]).to contain_exactly(alice.id.to_s, bob.id.to_s)
end
it 'does not return blocked users' do
@ -58,7 +58,7 @@ describe Api::V1::Accounts::FollowerAccountsController do
get :index, params: { account_id: account.id, limit: 2 }
expect(body_as_json.size).to eq 2
expect([body_as_json[0][:id], body_as_json[1][:id]]).to match_array([alice.id.to_s, bob.id.to_s])
expect([body_as_json[0][:id], body_as_json[1][:id]]).to contain_exactly(alice.id.to_s, bob.id.to_s)
end
end
end

View file

@ -28,7 +28,7 @@ describe Api::V1::Accounts::FollowingAccountsController do
get :index, params: { account_id: account.id, limit: 2 }
expect(body_as_json.size).to eq 2
expect([body_as_json[0][:id], body_as_json[1][:id]]).to match_array([alice.id.to_s, bob.id.to_s])
expect([body_as_json[0][:id], body_as_json[1][:id]]).to contain_exactly(alice.id.to_s, bob.id.to_s)
end
it 'does not return blocked users' do
@ -58,7 +58,7 @@ describe Api::V1::Accounts::FollowingAccountsController do
get :index, params: { account_id: account.id, limit: 2 }
expect(body_as_json.size).to eq 2
expect([body_as_json[0][:id], body_as_json[1][:id]]).to match_array([alice.id.to_s, bob.id.to_s])
expect([body_as_json[0][:id], body_as_json[1][:id]]).to contain_exactly(alice.id.to_s, bob.id.to_s)
end
end
end

View file

@ -99,7 +99,7 @@ describe Api::V1::Accounts::StatusesController do
it 'lists both the public and the private statuses' do
get :index, params: { account_id: account.id, pinned: true }
json = body_as_json
expect(json.map { |item| item[:id].to_i }).to match_array([status.id, private_status.id])
expect(json.map { |item| item[:id].to_i }).to contain_exactly(status.id, private_status.id)
end
end
end