aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/mysql2/enum_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/adapters/mysql2/enum_test.rb')
-rw-r--r--activerecord/test/cases/adapters/mysql2/enum_test.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/mysql2/enum_test.rb b/activerecord/test/cases/adapters/mysql2/enum_test.rb
new file mode 100644
index 0000000000..832f5d61d1
--- /dev/null
+++ b/activerecord/test/cases/adapters/mysql2/enum_test.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+require "cases/helper"
+
+class Mysql2EnumTest < ActiveRecord::Mysql2TestCase
+ class EnumTest < ActiveRecord::Base
+ end
+
+ def test_enum_limit
+ column = EnumTest.columns_hash["enum_column"]
+ assert_equal 8, column.limit
+ end
+
+ def test_should_not_be_unsigned
+ column = EnumTest.columns_hash["enum_column"]
+ assert_not_predicate column, :unsigned?
+ end
+
+ def test_should_not_be_bigint
+ column = EnumTest.columns_hash["enum_column"]
+ assert_not_predicate column, :bigint?
+ end
+end