Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Oracle adapter returns numeric (not string) value after SUM

  • Loading branch information...
commit a12358b3a5e69f41079595d5c92677b66ae6e642 1 parent d40e3ea
@rsim rsim authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 activerecord/test/cases/calculations_test.rb
View
7 activerecord/test/cases/calculations_test.rb
@@ -298,7 +298,12 @@ def test_count_with_too_many_parameters_raises
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
Please sign in to comment.
Something went wrong with that request. Please try again.