Skip to content

Commit 6ce14ee

Browse files
committed
Address intermittent CI failure due to non-determined sort order
https://buildkite.com/rails/rails/builds/76112#1aa6023d-f58e-4c3e-96cc-027e36f2f415/973-984
1 parent bad93fe commit 6ce14ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activerecord/test/cases/json_serialization_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ def test_should_allow_options_for_hash_of_authors
301301

302302
def test_should_be_able_to_encode_relation
303303
set_include_root_in_json(true) do
304-
authors_relation = Author.where(id: [@david.id, @mary.id])
304+
authors_relation = Author.where(id: [@david.id, @mary.id]).order(:id)
305305

306306
json = ActiveSupport::JSON.encode authors_relation, only: :name
307307
assert_equal '[{"author":{"name":"David"}},{"author":{"name":"Mary"}}]', json

0 commit comments

Comments
 (0)