From ad9f678d13db438d48d497bf71ccef6856d58a7d Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 25 Feb 2006 23:41:51 +0000 Subject: Compatibility patches for calculations git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3653 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/calculations_test.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'activerecord/test') 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 -- cgit v1.2.3