Address intermittent CI failure due to non-determined sort order
https://buildkite.com/rails/rails/builds/76112#1aa6023d-f58e-4c3e-96cc-027e36f2f415/973-984
This commit is contained in:
parent
bad93fe2a1
commit
6ce14ee4bc
|
@ -301,7 +301,7 @@ class DatabaseConnectedJsonEncodingTest < ActiveRecord::TestCase
|
|||
|
||||
def test_should_be_able_to_encode_relation
|
||||
set_include_root_in_json(true) do
|
||||
authors_relation = Author.where(id: [@david.id, @mary.id])
|
||||
authors_relation = Author.where(id: [@david.id, @mary.id]).order(:id)
|
||||
|
||||
json = ActiveSupport::JSON.encode authors_relation, only: :name
|
||||
assert_equal '[{"author":{"name":"David"}},{"author":{"name":"Mary"}}]', json
|
||||
|
|
Loading…
Reference in New Issue