diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2016-01-03 05:41:53 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2016-01-04 14:46:59 +0900 |
commit | 2f373dd916cfab568d489e2103ba71284bc3e695 (patch) | |
tree | 0bbb0ab9f62b7a2927395e5d8e04caa080eb95a2 /activerecord/test/cases/adapters | |
parent | 3d590add45b7ff1de972d99b076cb504d5208935 (diff) | |
download | rails-2f373dd916cfab568d489e2103ba71284bc3e695.tar.gz rails-2f373dd916cfab568d489e2103ba71284bc3e695.tar.bz2 rails-2f373dd916cfab568d489e2103ba71284bc3e695.zip |
Fix `unsigned?` and `blob_or_text_column?` for Enum columns in MySQL
Diffstat (limited to 'activerecord/test/cases/adapters')
-rw-r--r-- | activerecord/test/cases/adapters/mysql2/enum_test.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/activerecord/test/cases/adapters/mysql2/enum_test.rb b/activerecord/test/cases/adapters/mysql2/enum_test.rb index bd732b5eca..bb89e893e0 100644 --- a/activerecord/test/cases/adapters/mysql2/enum_test.rb +++ b/activerecord/test/cases/adapters/mysql2/enum_test.rb @@ -5,6 +5,17 @@ class Mysql2EnumTest < ActiveRecord::Mysql2TestCase end def test_enum_limit - assert_equal 6, EnumTest.columns.first.limit + column = EnumTest.columns_hash['enum_column'] + assert_equal 8, column.limit + end + + def test_should_not_be_blob_or_text_column + column = EnumTest.columns_hash['enum_column'] + assert_not column.blob_or_text_column? + end + + def test_should_not_be_unsigned + column = EnumTest.columns_hash['enum_column'] + assert_not column.unsigned? end end |