Fix intmermittent failure in `api/v1/accounts/statuses` controller spec (#28931)

pull/28933/head
Matt Jankowski 2024-01-26 09:10:26 -05:00 committed by GitHub
parent 805dba7f8d
commit 9cc1817bb4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 5 deletions

View File

@ -39,11 +39,14 @@ describe Api::V1::Accounts::StatusesController do
end
it 'returns posts along with self replies', :aggregate_failures do
json = body_as_json
post_ids = json.map { |item| item[:id].to_i }.sort
expect(response).to have_http_status(200)
expect(post_ids).to eq [status.id, status_self_reply.id]
expect(response)
.to have_http_status(200)
expect(body_as_json)
.to have_attributes(size: 2)
.and contain_exactly(
include(id: status.id.to_s),
include(id: status_self_reply.id.to_s)
)
end
end