aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-02-25 23:41:51 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-02-25 23:41:51 +0000
commitad9f678d13db438d48d497bf71ccef6856d58a7d (patch)
treeb1fd34220ae6449a501a7b21c44e9d193b5de14e /activerecord/test
parent4bd80f110d41a02ddc76212a92b5367541e6bce7 (diff)
downloadrails-ad9f678d13db438d48d497bf71ccef6856d58a7d.tar.gz
rails-ad9f678d13db438d48d497bf71ccef6856d58a7d.tar.bz2
rails-ad9f678d13db438d48d497bf71ccef6856d58a7d.zip
Compatibility patches for calculations
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3653 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
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