Skip to content
Browse files

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.
  • Loading branch information...
1 parent 9f5b1e1 commit 47871b025e2205c9686ab1a20464cb4fac98cd74 @pixeltrix pixeltrix committed Mar 13, 2011
Showing with 1 addition and 5 deletions.
  1. +1 −5 activerecord/test/cases/relations_test.rb
View
6 activerecord/test/cases/relations_test.rb
@@ -690,17 +690,13 @@ def test_empty
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

0 comments on commit 47871b0

Please sign in to comment.
Something went wrong with that request. Please try again.