aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/cascaded_eager_loading_test.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-08-27 15:14:48 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-08-27 15:14:48 -0700
commit594ce0f0a84f6de7719d59b55eee4b859efd6461 (patch)
tree7bc049bac83ea0edae6f95f6084523744b826c66 /activerecord/test/cases/associations/cascaded_eager_loading_test.rb
parent169c2141fc4b37788582fe02908f696a56d70a7b (diff)
downloadrails-594ce0f0a84f6de7719d59b55eee4b859efd6461.tar.gz
rails-594ce0f0a84f6de7719d59b55eee4b859efd6461.tar.bz2
rails-594ce0f0a84f6de7719d59b55eee4b859efd6461.zip
query the association rather than send the method for the association name
Diffstat (limited to 'activerecord/test/cases/associations/cascaded_eager_loading_test.rb')
-rw-r--r--activerecord/test/cases/associations/cascaded_eager_loading_test.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/activerecord/test/cases/associations/cascaded_eager_loading_test.rb b/activerecord/test/cases/associations/cascaded_eager_loading_test.rb
index e693d34f99..811d91f849 100644
--- a/activerecord/test/cases/associations/cascaded_eager_loading_test.rb
+++ b/activerecord/test/cases/associations/cascaded_eager_loading_test.rb
@@ -52,12 +52,10 @@ class CascadedEagerLoadingTest < ActiveRecord::TestCase
def test_cascaded_eager_association_loading_with_join_for_count
categories = Category.joins(:categorizations).includes([{:posts=>:comments}, :authors])
- assert_nothing_raised do
- assert_equal 4, categories.count
- assert_equal 4, categories.to_a.count
- assert_equal 3, categories.distinct.count
- assert_equal 3, categories.to_a.uniq.size # Must uniq since instantiating with inner joins will get dupes
- end
+ assert_equal 4, categories.count
+ assert_equal 4, categories.to_a.count
+ assert_equal 3, categories.distinct.count
+ assert_equal 3, categories.to_a.uniq.size # Must uniq since instantiating with inner joins will get dupes
end
def test_cascaded_eager_association_loading_with_duplicated_includes