From b871b3fab5f0e82e80310cde8476ab7234b7b6f6 Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Wed, 21 May 2014 10:11:30 -0700 Subject: Rename `oid_type` to `cast_type` to make PG columns consistent --- activerecord/test/cases/adapters/postgresql/array_test.rb | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'activerecord/test') diff --git a/activerecord/test/cases/adapters/postgresql/array_test.rb b/activerecord/test/cases/adapters/postgresql/array_test.rb index c20030ca64..34c2008ab4 100644 --- a/activerecord/test/cases/adapters/postgresql/array_test.rb +++ b/activerecord/test/cases/adapters/postgresql/array_test.rb @@ -89,16 +89,7 @@ class PostgresqlArrayTest < ActiveRecord::TestCase end def test_type_cast_array - data = '{1,2,3}' - oid_type = @column.instance_variable_get('@oid_type').subtype - # we are getting the instance variable in this test, but in the - # normal use of string_to_array, it's called from the OID::Array - # class and will have the OID instance that will provide the type - # casting - array = @column.class.string_to_array data, oid_type - assert_equal(['1', '2', '3'], array) - assert_equal(['1', '2', '3'], @column.type_cast(data)) - + assert_equal(['1', '2', '3'], @column.type_cast('{1,2,3}')) assert_equal([], @column.type_cast('{}')) assert_equal([nil], @column.type_cast('{NULL}')) end -- cgit v1.2.3