diff options
author | Erich Menge <erich.menge@me.com> | 2012-05-15 19:51:27 -0500 |
---|---|---|
committer | Erich Menge <erich.menge@me.com> | 2012-05-16 12:02:02 -0500 |
commit | c90f16da626a7edac45f7027b127ad874619455a (patch) | |
tree | ef6e0729f1f6657dbc3c7789ae2293c5c6cc61f2 /activerecord/test | |
parent | 7994496ab4127cf15323563acd55170b9d35821a (diff) | |
download | rails-c90f16da626a7edac45f7027b127ad874619455a.tar.gz rails-c90f16da626a7edac45f7027b127ad874619455a.tar.bz2 rails-c90f16da626a7edac45f7027b127ad874619455a.zip |
Fixes issue where SQL fragments prevented type casting based on column type.
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/calculations_test.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/test/cases/calculations_test.rb b/activerecord/test/cases/calculations_test.rb index c9a70bae77..f8bd11e3d0 100644 --- a/activerecord/test/cases/calculations_test.rb +++ b/activerecord/test/cases/calculations_test.rb @@ -468,6 +468,9 @@ class CalculationsTest < ActiveRecord::TestCase def test_pluck_with_selection_clause assert_equal [50, 53, 55, 60], Account.pluck('DISTINCT credit_limit').sort + assert_equal [50, 53, 55, 60], Account.pluck('DISTINCT accounts.credit_limit').sort + assert_equal [50, 53, 55, 60], Account.pluck('DISTINCT(credit_limit)').sort + assert_equal [50 + 53 + 55 + 60], Account.pluck('SUM(DISTINCT(credit_limit))') end def test_pluck_expects_a_single_selection |