aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/associations_join_model_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/associations_join_model_test.rb')
-rw-r--r--activerecord/test/associations_join_model_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/associations_join_model_test.rb b/activerecord/test/associations_join_model_test.rb
index ede21785e7..b5d48db8bc 100644
--- a/activerecord/test/associations_join_model_test.rb
+++ b/activerecord/test/associations_join_model_test.rb
@@ -370,6 +370,10 @@ class AssociationsJoinModelTest < Test::Unit::TestCase
assert_raise(ActiveRecord::ReadOnlyAssociation) { posts(:thinking).tags.build(:name => 'foo') }
assert_raise(ActiveRecord::ReadOnlyAssociation) { posts(:thinking).tags.create(:name => 'foo') }
end
+
+ def test_has_many_through_sum_uses_calculations
+ assert_nothing_raised { authors(:david).comments.sum(:post_id) }
+ end
private
# create dynamic Post models to allow different dependency options