aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/calculations_test.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/activerecord/test/calculations_test.rb b/activerecord/test/calculations_test.rb
index f4bc4f3c5b..fb47666119 100644
--- a/activerecord/test/calculations_test.rb
+++ b/activerecord/test/calculations_test.rb
@@ -108,9 +108,11 @@ class CalculationsTest < Test::Unit::TestCase
end
def test_should_calculate_grouped_by_function_with_table_alias
- c = Topic.count(:all, :group => 'DATE(topics.written_on)')
- assert_equal 1, c["2003-07-15"]
- assert_equal 1, c["2003-07-16"]
+ c = Company.count(:all, :group => 'UPPER(companies.type)')
+ assert_equal 2, c[nil]
+ assert_equal 1, c['DEPENDENTFIRM']
+ assert_equal 3, c['CLIENT']
+ assert_equal 2, c['FIRM']
end
def test_should_sum_scoped_field