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/bit_string_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/bit_string_test.rb')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/bit_string_test.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/bit_string_test.rb b/activerecord/test/cases/adapters/postgresql/bit_string_test.rb index f154ba4cdc..ad433b9d1b 100644 --- a/activerecord/test/cases/adapters/postgresql/bit_string_test.rb +++ b/activerecord/test/cases/adapters/postgresql/bit_string_test.rb @@ -26,18 +26,22 @@ class PostgresqlBitStringTest < ActiveRecord::TestCase column = PostgresqlBitString.columns_hash["a_bit"] assert_equal :bit, column.type assert_equal "bit(8)", column.sql_type - assert_not column.number? - assert_not column.binary? assert_not column.array? + + type = PostgresqlBitString.type_for_attribute("a_bit") + assert_not type.number? + assert_not type.binary? end def test_bit_string_varying_column column = PostgresqlBitString.columns_hash["a_bit_varying"] assert_equal :bit_varying, column.type assert_equal "bit varying(4)", column.sql_type - assert_not column.number? - assert_not column.binary? assert_not column.array? + + type = PostgresqlBitString.type_for_attribute("a_bit_varying") + assert_not type.number? + assert_not type.binary? end def test_default |