aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2011-03-13 08:37:16 +0000
committerAndrew White <andyw@pixeltrix.co.uk>2011-03-13 08:43:19 +0000
commit47871b025e2205c9686ab1a20464cb4fac98cd74 (patch)
treeddaadb15781fb38d4ee6c2ec64b68080fb07dc5d
parent9f5b1e1ed08df9dbedded0a6b7798d919d43b9a6 (diff)
downloadrails-47871b025e2205c9686ab1a20464cb4fac98cd74.tar.gz
rails-47871b025e2205c9686ab1a20464cb4fac98cd74.tar.bz2
rails-47871b025e2205c9686ab1a20464cb4fac98cd74.zip
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.
-rw-r--r--activerecord/test/cases/relations_test.rb6
1 files changed, 1 insertions, 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