diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2016-01-04 21:14:50 -0200 |
---|---|---|
committer | Rafael França <rafaelmfranca@gmail.com> | 2016-01-04 21:14:50 -0200 |
commit | 35dd9e9f2a10d9d2f46d1c1cdd1df73f7d343d6e (patch) | |
tree | 83f0b5dce55bf54f26be261c4e844352ac7d37f8 /activerecord/test/cases | |
parent | 8788c7ce84619053a53db569cfbeece74daff52c (diff) | |
parent | 2f373dd916cfab568d489e2103ba71284bc3e695 (diff) | |
download | rails-35dd9e9f2a10d9d2f46d1c1cdd1df73f7d343d6e.tar.gz rails-35dd9e9f2a10d9d2f46d1c1cdd1df73f7d343d6e.tar.bz2 rails-35dd9e9f2a10d9d2f46d1c1cdd1df73f7d343d6e.zip |
Merge pull request #22896 from kamipo/fix_unsigned_and_blob_or_text_column
Fix `unsigned?` and `blob_or_text_column` for Enum columns in MySQL
Diffstat (limited to 'activerecord/test/cases')
-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 |