aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/calculations_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/calculations_test.rb')
-rw-r--r--activerecord/test/calculations_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/calculations_test.rb b/activerecord/test/calculations_test.rb
index 785a4d10b4..67de1b9bd5 100644
--- a/activerecord/test/calculations_test.rb
+++ b/activerecord/test/calculations_test.rb
@@ -133,7 +133,7 @@ class CalculationsTest < Test::Unit::TestCase
end
def test_should_calculate_grouped_by_function
- c = Company.count(:all, :group => 'UPPER(type)')
+ c = Company.count(:all, :group => "UPPER(#{QUOTED_TYPE})")
assert_equal 2, c[nil]
assert_equal 1, c['DEPENDENTFIRM']
assert_equal 3, c['CLIENT']
@@ -141,7 +141,7 @@ class CalculationsTest < Test::Unit::TestCase
end
def test_should_calculate_grouped_by_function_with_table_alias
- c = Company.count(:all, :group => 'UPPER(companies.type)')
+ c = Company.count(:all, :group => "UPPER(companies.#{QUOTED_TYPE})")
assert_equal 2, c[nil]
assert_equal 1, c['DEPENDENTFIRM']
assert_equal 3, c['CLIENT']