Skip to content

Commit 4175896

Browse files
committed
Remove a comment that is not fact in tests
mysql2 gem have type casting mechanism from raw payload to Ruby primitive object.
1 parent b4bca94 commit 4175896

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

activerecord/test/cases/calculations_test.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -756,11 +756,7 @@ def test_pluck_with_selection_clause
756756
assert_equal [50, 53, 55, 60], Account.pluck(Arel.sql("DISTINCT credit_limit")).sort
757757
assert_equal [50, 53, 55, 60], Account.pluck(Arel.sql("DISTINCT accounts.credit_limit")).sort
758758
assert_equal [50, 53, 55, 60], Account.pluck(Arel.sql("DISTINCT(credit_limit)")).sort
759-
760-
# MySQL returns "SUM(DISTINCT(credit_limit))" as the column name unless
761-
# an alias is provided. Without the alias, the column cannot be found
762-
# and properly typecast.
763-
assert_equal [50 + 53 + 55 + 60], Account.pluck(Arel.sql("SUM(DISTINCT(credit_limit)) as credit_limit"))
759+
assert_equal [50 + 53 + 55 + 60], Account.pluck(Arel.sql("SUM(DISTINCT(credit_limit))"))
764760
end
765761

766762
def test_plucks_with_ids

0 commit comments

Comments
 (0)