diff options
Diffstat (limited to 'activerecord/test/calculations_test.rb')
-rw-r--r-- | activerecord/test/calculations_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/calculations_test.rb b/activerecord/test/calculations_test.rb index c4e41b1dda..785a4d10b4 100644 --- a/activerecord/test/calculations_test.rb +++ b/activerecord/test/calculations_test.rb @@ -187,4 +187,9 @@ class CalculationsTest < Test::Unit::TestCase assert_raises(ArgumentError) { Company.send(:validate_calculation_options, :sum, :foo => :bar) } assert_raises(ArgumentError) { Company.send(:validate_calculation_options, :count, :foo => :bar) } end + + def test_should_count_selected_field_with_include + assert_equal 5, Account.count(:distinct => true, :include => :firm) + assert_equal 3, Account.count(:distinct => true, :include => :firm, :select => :credit_limit) + end end |