aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/schema_dumper_test.rb
diff options
context:
space:
mode:
authorVictor Costan <costan@gmail.com>2012-10-16 05:53:18 -0400
committerVictor Costan <costan@gmail.com>2012-10-27 13:41:27 -0400
commit5d30e443908558713cff16cdad4b09e203c8fae8 (patch)
tree071dcdd7622515bc8c2556e36f2745e5d22a7fe2 /activerecord/test/cases/schema_dumper_test.rb
parent028f29dc91cad17ae0634e0973f7ff1b43435466 (diff)
downloadrails-5d30e443908558713cff16cdad4b09e203c8fae8.tar.gz
rails-5d30e443908558713cff16cdad4b09e203c8fae8.tar.bz2
rails-5d30e443908558713cff16cdad4b09e203c8fae8.zip
Use the MySQL varbinary type when appropriate in migrations.
Diffstat (limited to 'activerecord/test/cases/schema_dumper_test.rb')
-rw-r--r--activerecord/test/cases/schema_dumper_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/schema_dumper_test.rb b/activerecord/test/cases/schema_dumper_test.rb
index 5f13124e5b..7ff0044bd4 100644
--- a/activerecord/test/cases/schema_dumper_test.rb
+++ b/activerecord/test/cases/schema_dumper_test.rb
@@ -203,6 +203,12 @@ class SchemaDumperTest < ActiveRecord::TestCase
assert_match %r{t.text\s+"body",\s+null: false$}, output
end
+ def test_schema_dump_includes_length_for_mysql_binary_fields
+ output = standard_dump
+ assert_match %r{t.binary\s+"var_binary",\s+limit: 255$}, output
+ assert_match %r{t.binary\s+"var_binary_large",\s+limit: 4095$}, output
+ end
+
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