diff options
author | Jeremy Kemper <jeremykemper@gmail.com> | 2014-09-10 14:03:34 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremykemper@gmail.com> | 2014-09-10 15:35:12 -0700 |
commit | da74eeb29426dd7940d1329f91a3894d2d6fb2cb (patch) | |
tree | 899a4279467e3fbb4b352799e1ca3226ac6463d6 /activerecord/test/cases | |
parent | 39303c0221d6854387c0e9038551e8e6d4533239 (diff) | |
download | rails-da74eeb29426dd7940d1329f91a3894d2d6fb2cb.tar.gz rails-da74eeb29426dd7940d1329f91a3894d2d6fb2cb.tar.bz2 rails-da74eeb29426dd7940d1329f91a3894d2d6fb2cb.zip |
MySQL: schema.rb now includes TEXT and BLOB column limits.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/schema_dumper_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/cases/schema_dumper_test.rb b/activerecord/test/cases/schema_dumper_test.rb index 79fad06565..c8fc297a7a 100644 --- a/activerecord/test/cases/schema_dumper_test.rb +++ b/activerecord/test/cases/schema_dumper_test.rb @@ -203,9 +203,9 @@ class SchemaDumperTest < ActiveRecord::TestCase end if current_adapter?(:MysqlAdapter, :Mysql2Adapter) - def test_schema_dump_should_not_add_default_value_for_mysql_text_field + def test_schema_dump_should_add_default_value_for_mysql_text_field output = standard_dump - assert_match %r{t.text\s+"body",\s+null: false$}, output + assert_match %r{t.text\s+"body",\s+limit: 65535,\s+null: false$}, output end def test_schema_dump_includes_length_for_mysql_binary_fields @@ -217,11 +217,11 @@ class SchemaDumperTest < ActiveRecord::TestCase def test_schema_dump_includes_length_for_mysql_blob_and_text_fields output = standard_dump assert_match %r{t.binary\s+"tiny_blob",\s+limit: 255$}, output - assert_match %r{t.binary\s+"normal_blob"$}, output + assert_match %r{t.binary\s+"normal_blob",\s+limit: 65535$}, output assert_match %r{t.binary\s+"medium_blob",\s+limit: 16777215$}, output assert_match %r{t.binary\s+"long_blob",\s+limit: 4294967295$}, output assert_match %r{t.text\s+"tiny_text",\s+limit: 255$}, output - assert_match %r{t.text\s+"normal_text"$}, output + assert_match %r{t.text\s+"normal_text",\s+limit: 65535$}, output assert_match %r{t.text\s+"medium_text",\s+limit: 16777215$}, output assert_match %r{t.text\s+"long_text",\s+limit: 4294967295$}, output end |