From 47871b025e2205c9686ab1a20464cb4fac98cd74 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Sun, 13 Mar 2011 08:37:16 +0000 Subject: Remove invalid test The test fails on PostgreSQL when trying to load the records as the comments_count field is not included in the GROUP BY clause. --- activerecord/test/cases/relations_test.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index ec53218451..00b7c26080 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -690,17 +690,13 @@ class RelationTest < ActiveRecord::TestCase def test_empty_complex_chained_relations posts = Post.select("comments_count").where("id is not null").group("author_id").where("comments_count > 0") + assert_queries(1) { assert_equal false, posts.empty? } assert ! posts.loaded? no_posts = posts.where(:title => "") assert_queries(1) { assert_equal true, no_posts.empty? } assert ! no_posts.loaded? - - best_posts = posts.where(:comments_count => 0) - best_posts.to_a # force load - assert_no_queries { assert_equal true, best_posts.empty? } - assert best_posts.loaded? end def test_any -- cgit v1.2.3