diff options
author | Sean Griffin <sean@thoughtbot.com> | 2015-01-30 11:42:54 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2015-01-30 11:42:54 -0700 |
commit | b93b39eff6829ee05ffec1cc8c505f69cbb53fdc (patch) | |
tree | 5b37fc7c7d36cc6e0abc2530606ea3acad05362c /activerecord/test/cases/adapters/postgresql/composite_test.rb | |
parent | 155b1b7fe3a1d231fb98a6fb04a21f6eb190b98f (diff) | |
download | rails-b93b39eff6829ee05ffec1cc8c505f69cbb53fdc.tar.gz rails-b93b39eff6829ee05ffec1cc8c505f69cbb53fdc.tar.bz2 rails-b93b39eff6829ee05ffec1cc8c505f69cbb53fdc.zip |
Remove most type related predicates from `Column`
Remaining are `limit`, `precision`, `scale`, and `type` (the symbol
version). These will remain on the column, since they mirror the options
to the `column` method in the schema definition DSL
Diffstat (limited to 'activerecord/test/cases/adapters/postgresql/composite_test.rb')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/composite_test.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/composite_test.rb b/activerecord/test/cases/adapters/postgresql/composite_test.rb index 24c1969dee..be0025218e 100644 --- a/activerecord/test/cases/adapters/postgresql/composite_test.rb +++ b/activerecord/test/cases/adapters/postgresql/composite_test.rb @@ -50,9 +50,11 @@ class PostgresqlCompositeTest < ActiveRecord::TestCase column = PostgresqlComposite.columns_hash["address"] assert_nil column.type assert_equal "full_address", column.sql_type - assert_not column.number? - assert_not column.binary? assert_not column.array? + + type = PostgresqlComposite.type_for_attribute("address") + assert_not type.number? + assert_not type.binary? end def test_composite_mapping @@ -111,9 +113,11 @@ class PostgresqlCompositeWithCustomOIDTest < ActiveRecord::TestCase column = PostgresqlComposite.columns_hash["address"] assert_equal :full_address, column.type assert_equal "full_address", column.sql_type - assert_not column.number? - assert_not column.binary? assert_not column.array? + + type = PostgresqlComposite.type_for_attribute("address") + assert_not type.number? + assert_not type.binary? end def test_composite_mapping |