diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-12-30 10:41:30 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-12-30 10:41:47 +0530 |
commit | a56518aee2258472f5f80807d733ccfa63eedb2d (patch) | |
tree | e3820e7e5c4da1b3ab2018118028153f66caf49e | |
parent | 79550e8995e97bd0278bfe5c05151ac94495e9b1 (diff) | |
download | rails-a56518aee2258472f5f80807d733ccfa63eedb2d.tar.gz rails-a56518aee2258472f5f80807d733ccfa63eedb2d.tar.bz2 rails-a56518aee2258472f5f80807d733ccfa63eedb2d.zip |
Fix the count test for postgres
-rw-r--r-- | activerecord/test/cases/relations_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index f0ef3e22c5..7b5ff246c0 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -418,7 +418,7 @@ class RelationTest < ActiveRecord::TestCase 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') |