Oracle adapter recourns count() as numeric (not string)
This commit is contained in:
parent
5d0dece6a6
commit
04e6bc1134
@ -50,7 +50,12 @@ def test_cache_is_flat
|
||||
|
||||
def test_cache_does_not_wrap_string_results_in_arrays
|
||||
Task.cache do
|
||||
assert_instance_of String, Task.connection.select_value("SELECT count(*) AS count_all FROM tasks")
|
||||
# Oracle adapter returns count() as Fixnum or Float
|
||||
if current_adapter?(:OracleAdapter)
|
||||
assert Task.connection.select_value("SELECT count(*) AS count_all FROM tasks").is_a?(Numeric)
|
||||
else
|
||||
assert_instance_of String, Task.connection.select_value("SELECT count(*) AS count_all FROM tasks")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user