diff options
Diffstat (limited to 'activerecord/test/cases/adapters/postgresql/domain_test.rb')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/domain_test.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/domain_test.rb b/activerecord/test/cases/adapters/postgresql/domain_test.rb index 1500adb42d..6102ddacd1 100644 --- a/activerecord/test/cases/adapters/postgresql/domain_test.rb +++ b/activerecord/test/cases/adapters/postgresql/domain_test.rb @@ -1,8 +1,7 @@ -# -*- coding: utf-8 -*- require "cases/helper" require 'support/connection_helper' -class PostgresqlDomainTest < ActiveRecord::TestCase +class PostgresqlDomainTest < ActiveRecord::PostgreSQLTestCase include ConnectionHelper class PostgresqlDomain < ActiveRecord::Base @@ -20,7 +19,7 @@ class PostgresqlDomainTest < ActiveRecord::TestCase end teardown do - @connection.execute 'DROP TABLE IF EXISTS postgresql_domains' + @connection.drop_table 'postgresql_domains', if_exists: true @connection.execute 'DROP DOMAIN IF EXISTS custom_money' reset_connection end @@ -29,9 +28,10 @@ class PostgresqlDomainTest < ActiveRecord::TestCase column = PostgresqlDomain.columns_hash["price"] assert_equal :decimal, column.type assert_equal "custom_money", column.sql_type - assert column.number? - assert_not column.binary? - assert_not column.array + assert_not column.array? + + type = PostgresqlDomain.type_for_attribute("price") + assert_not type.binary? end def test_domain_acts_like_basetype |