mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Oracle adapter returns numeric (not string) value after SUM
This commit is contained in:
parent
d40e3ea936
commit
a12358b3a5
1 changed files with 6 additions and 1 deletions
|
@ -298,7 +298,12 @@ class CalculationsTest < ActiveRecord::TestCase
|
|||
end
|
||||
|
||||
def test_should_sum_expression
|
||||
assert_equal '636', Account.sum("2 * credit_limit")
|
||||
# Oracle adapter returns floating point value 636.0 after SUM
|
||||
if current_adapter?(:OracleAdapter)
|
||||
assert_equal 636, Account.sum("2 * credit_limit")
|
||||
else
|
||||
assert_equal '636', Account.sum("2 * credit_limit")
|
||||
end
|
||||
end
|
||||
|
||||
def test_count_with_from_option
|
||||
|
|
Loading…
Reference in a new issue