aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-05-11 13:32:04 -0700
committerJon Leighton <j@jonathanleighton.com>2011-05-11 13:32:04 -0700
commitd192d85668e967547a20cdbd0a0f40a8477b272a (patch)
tree828c20fca51384584b917704d0aad0781bf30888 /activerecord/test/cases/associations
parentc53d3929cd5d7a2ac39411c8137d469e5047a4f4 (diff)
parent1db49ced45819c7284dfd63aad791ead3a26203e (diff)
downloadrails-d192d85668e967547a20cdbd0a0f40a8477b272a.tar.gz
rails-d192d85668e967547a20cdbd0a0f40a8477b272a.tar.bz2
rails-d192d85668e967547a20cdbd0a0f40a8477b272a.zip
Merge pull request #512 from pivotalneutron/fix_eager_load_with_calculations
Bug fixes for calculations with includes
Diffstat (limited to 'activerecord/test/cases/associations')
-rw-r--r--activerecord/test/cases/associations/cascaded_eager_loading_test.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/test/cases/associations/cascaded_eager_loading_test.rb b/activerecord/test/cases/associations/cascaded_eager_loading_test.rb
index 39e8a7960a..49d8722aff 100644
--- a/activerecord/test/cases/associations/cascaded_eager_loading_test.rb
+++ b/activerecord/test/cases/associations/cascaded_eager_loading_test.rb
@@ -51,7 +51,9 @@ class CascadedEagerLoadingTest < ActiveRecord::TestCase
categories = Category.joins(:categorizations).includes([{:posts=>:comments}, :authors])
assert_nothing_raised do
- assert_equal 3, categories.count
+ assert_equal 4, categories.count
+ assert_equal 4, categories.all.count
+ assert_equal 3, categories.count(:distinct => true)
assert_equal 3, categories.all.uniq.size # Must uniq since instantiating with inner joins will get dupes
end
end