diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-02-10 16:06:39 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-02-10 16:06:39 -0800 |
commit | c50cb4aa393f2cee30ad85b32db532eb955f6637 (patch) | |
tree | ae9e5dd63249a6875a458174c0827995b95433a8 /activerecord/test/cases | |
parent | fa6cda53ebc7fd186a91fd0983dc9ddf20e9d39a (diff) | |
download | rails-c50cb4aa393f2cee30ad85b32db532eb955f6637.tar.gz rails-c50cb4aa393f2cee30ad85b32db532eb955f6637.tar.bz2 rails-c50cb4aa393f2cee30ad85b32db532eb955f6637.zip |
PG column consults oid types when typecasting
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/column_definition_test.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/activerecord/test/cases/column_definition_test.rb b/activerecord/test/cases/column_definition_test.rb index 14884e42af..a44b49466f 100644 --- a/activerecord/test/cases/column_definition_test.rb +++ b/activerecord/test/cases/column_definition_test.rb @@ -126,17 +126,20 @@ module ActiveRecord if current_adapter?(:PostgreSQLAdapter) def test_bigint_column_should_map_to_integer - bigint_column = PostgreSQLColumn.new('number', nil, "bigint") + oid = PostgreSQLAdapter::OID::Identity.new + bigint_column = PostgreSQLColumn.new('number', nil, oid, "bigint") assert_equal :integer, bigint_column.type end def test_smallint_column_should_map_to_integer - smallint_column = PostgreSQLColumn.new('number', nil, "smallint") + oid = PostgreSQLAdapter::OID::Identity.new + smallint_column = PostgreSQLColumn.new('number', nil, oid, "smallint") assert_equal :integer, smallint_column.type end def test_uuid_column_should_map_to_string - uuid_column = PostgreSQLColumn.new('unique_id', nil, "uuid") + oid = PostgreSQLAdapter::OID::Identity.new + uuid_column = PostgreSQLColumn.new('unique_id', nil, oid, "uuid") assert_equal :string, uuid_column.type end end |