mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Ensure ordering to make the test pass with postgresql
This commit is contained in:
parent
5e7919cd63
commit
a739340d3c
1 changed files with 5 additions and 4 deletions
|
@ -1440,7 +1440,8 @@ class RelationTest < ActiveRecord::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
test 'group with select and includes' do
|
test 'group with select and includes' do
|
||||||
authors_count = Post.select('author_id, COUNT(author_id) AS num_posts').group('author_id').includes(:author).to_a
|
authors_count = Post.select('author_id, COUNT(author_id) AS num_posts').
|
||||||
|
group('author_id').order('author_id').includes(:author).to_a
|
||||||
|
|
||||||
assert_no_queries do
|
assert_no_queries do
|
||||||
result = authors_count.map do |post|
|
result = authors_count.map do |post|
|
||||||
|
|
Loading…
Reference in a new issue