Fix some flaky tests that randomly failed because of item ordering (#17509)
This commit is contained in:
parent
2af03164cb
commit
472bc89611
5 changed files with 20 additions and 20 deletions
|
@ -79,7 +79,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 }.sort).to eq [status.id, private_status.id].sort
|
||||
expect(json.map { |item| item[:id].to_i }).to match_array([status.id, private_status.id])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue