mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Refactor calculation test to remove unneeded SQLite special case.
[#4633] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
This commit is contained in:
parent
f53a6d8149
commit
47d568ed3f
1 changed files with 1 additions and 4 deletions
|
@ -287,11 +287,8 @@ class CalculationsTest < ActiveRecord::TestCase
|
|||
# Oracle adapter returns floating point value 636.0 after SUM
|
||||
if current_adapter?(:OracleAdapter)
|
||||
assert_equal 636, Account.sum("2 * credit_limit")
|
||||
elsif current_adapter?(:SQLite3Adapter)
|
||||
# Future versions of the SQLite3 adapter will return a number
|
||||
assert_equal 636, Account.sum("2 * credit_limit").to_i
|
||||
else
|
||||
assert_equal '636', Account.sum("2 * credit_limit")
|
||||
assert_equal 636, Account.sum("2 * credit_limit").to_i
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue