diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-05-21 10:11:30 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-05-21 10:11:30 -0700 |
commit | b871b3fab5f0e82e80310cde8476ab7234b7b6f6 (patch) | |
tree | ad378b7b3ec443158e81db5b18cd1cd2fd03b3ec /activerecord/test | |
parent | b042f21c93959e0247d447f37644815bdc6d5851 (diff) | |
download | rails-b871b3fab5f0e82e80310cde8476ab7234b7b6f6.tar.gz rails-b871b3fab5f0e82e80310cde8476ab7234b7b6f6.tar.bz2 rails-b871b3fab5f0e82e80310cde8476ab7234b7b6f6.zip |
Rename `oid_type` to `cast_type` to make PG columns consistent
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/array_test.rb | 11 |
1 files changed, 1 insertions, 10 deletions
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 |