Fix the count test for postgres
This commit is contained in:
parent
79550e8995
commit
a56518aee2
@ -418,7 +418,7 @@ def test_count_explicit_columns
|
||||
Post.update_all(:comments_count => nil)
|
||||
posts = Post.scoped
|
||||
|
||||
assert_equal 0, posts.select('comments_count').where('id is not null').order('id').count
|
||||
assert_equal [0], posts.select('comments_count').where('id is not null').group('id').order('id').count.values.uniq
|
||||
assert_equal 0, posts.where('id is not null').select('comments_count').count
|
||||
|
||||
assert_equal 7, posts.select('comments_count').count('id')
|
||||
|
Loading…
Reference in New Issue
Block a user