mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove a comment that is not fact in tests
mysql2 gem have type casting mechanism from raw payload to Ruby primitive object.
This commit is contained in:
parent
b4bca947fb
commit
41758964e9
1 changed files with 1 additions and 5 deletions
|
@ -756,11 +756,7 @@ class CalculationsTest < ActiveRecord::TestCase
|
|||
assert_equal [50, 53, 55, 60], Account.pluck(Arel.sql("DISTINCT credit_limit")).sort
|
||||
assert_equal [50, 53, 55, 60], Account.pluck(Arel.sql("DISTINCT accounts.credit_limit")).sort
|
||||
assert_equal [50, 53, 55, 60], Account.pluck(Arel.sql("DISTINCT(credit_limit)")).sort
|
||||
|
||||
# MySQL returns "SUM(DISTINCT(credit_limit))" as the column name unless
|
||||
# an alias is provided. Without the alias, the column cannot be found
|
||||
# and properly typecast.
|
||||
assert_equal [50 + 53 + 55 + 60], Account.pluck(Arel.sql("SUM(DISTINCT(credit_limit)) as credit_limit"))
|
||||
assert_equal [50 + 53 + 55 + 60], Account.pluck(Arel.sql("SUM(DISTINCT(credit_limit))"))
|
||||
end
|
||||
|
||||
def test_plucks_with_ids
|
||||
|
|
Loading…
Reference in a new issue