Sort the results as order not guaranteed

This commit is contained in:
Aidan Haran 2022-01-13 16:31:36 +00:00
parent 83a4fa414b
commit 974d0dd590
1 changed files with 1 additions and 1 deletions

View File

@ -293,7 +293,7 @@ module ActiveRecord
skip_if_sqlite3_version_includes_quoting_bug
quoted_join = ActiveRecord::Base.connection.quote_table_name("join")
selected = Post.select(:join).from(Post.select("id as #{quoted_join}")).map(&:join)
assert_equal Post.pluck(:id), selected
assert_equal Post.pluck(:id).sort, selected.sort
end
def test_selecting_aliased_attribute_quotes_column_name_when_from_is_used