diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/relations_test.rb | 6 |
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 |