aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2014-05-22 09:39:16 -0700
committerSean Griffin <sean@thoughtbot.com>2014-05-22 09:43:30 -0700
commit4826a4ab348e59c3ac1f6c31fd73f93eabb91a3b (patch)
tree053d88e831c9b6c95fecc29a32bd5f21c7b3b488 /activerecord/test/cases/adapters
parent110d3d0c0bceddd05cab86c0463f0aa71df815cb (diff)
downloadrails-4826a4ab348e59c3ac1f6c31fd73f93eabb91a3b.tar.gz
rails-4826a4ab348e59c3ac1f6c31fd73f93eabb91a3b.tar.bz2
rails-4826a4ab348e59c3ac1f6c31fd73f93eabb91a3b.zip
Use the generic type map for all PG type registrations
We're going to want all of the benefits of the type map object for registrations, including block registration and real aliasing. Moves type name registrations to the adapter, and aliases the OIDs to the named types
Diffstat (limited to 'activerecord/test/cases/adapters')
-rw-r--r--activerecord/test/cases/adapters/postgresql/composite_test.rb10
1 files changed, 1 insertions, 9 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/composite_test.rb b/activerecord/test/cases/adapters/postgresql/composite_test.rb
index f01717d1a7..1f55cce352 100644
--- a/activerecord/test/cases/adapters/postgresql/composite_test.rb
+++ b/activerecord/test/cases/adapters/postgresql/composite_test.rb
@@ -102,15 +102,7 @@ class PostgresqlCompositeWithCustomOIDTest < ActiveRecord::TestCase
def setup
super
- @registration = ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID
- @registration.register_type "full_address", FullAddressType.new
- end
-
- def teardown
- super
-
- # there is currently no clean way to unregister a OID::Type
- @registration::NAMES.delete("full_address")
+ @connection.type_map.register_type "full_address", FullAddressType.new
end
def test_column