about summary refs log tree commit diff
path: root/spec/controllers/api/v1
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-02-10 22:00:10 +0100
committerGitHub <noreply@github.com>2022-02-10 22:00:10 +0100
commit472bc89611cb3ce0594cd7b42b730c3484899c33 (patch)
tree6444a5f668d62cd04b68f30c0a0ce8dd52e83965 /spec/controllers/api/v1
parent2af03164cbf0c3e86b551d9be338780c204ef9fa (diff)
Fix some flaky tests that randomly failed because of item ordering (#17509)
Diffstat (limited to 'spec/controllers/api/v1')
-rw-r--r--spec/controllers/api/v1/accounts/statuses_controller_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/controllers/api/v1/accounts/statuses_controller_spec.rb b/spec/controllers/api/v1/accounts/statuses_controller_spec.rb
index 348de08c2..b962b3398 100644
--- a/spec/controllers/api/v1/accounts/statuses_controller_spec.rb
+++ b/spec/controllers/api/v1/accounts/statuses_controller_spec.rb
@@ -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