diff options
Diffstat (limited to 'activerecord/test/cases/schema_dumper_test.rb')
-rw-r--r-- | activerecord/test/cases/schema_dumper_test.rb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/activerecord/test/cases/schema_dumper_test.rb b/activerecord/test/cases/schema_dumper_test.rb index bafc9fa81b..513f65f707 100644 --- a/activerecord/test/cases/schema_dumper_test.rb +++ b/activerecord/test/cases/schema_dumper_test.rb @@ -225,17 +225,15 @@ class SchemaDumperTest < ActiveRecord::TestCase assert_match %r{t\.text\s+"long_text",\s+limit: 4294967295$}, output end - def test_schema_dumps_index_type + def test_schema_does_not_include_limit_for_emulated_mysql_boolean_fields output = standard_dump - assert_match %r{add_index "key_tests", \["awesome"\], name: "index_key_tests_on_awesome", type: :fulltext}, output - assert_match %r{add_index "key_tests", \["pizza"\], name: "index_key_tests_on_pizza", using: :btree}, output + assert_no_match %r{t\.boolean\s+"has_fun",.+limit: 1}, output end - end - if mysql_56? - def test_schema_dump_includes_datetime_precision + def test_schema_dumps_index_type output = standard_dump - assert_match %r{t\.datetime\s+"written_on",\s+precision: 6$}, output + assert_match %r{add_index "key_tests", \["awesome"\], name: "index_key_tests_on_awesome", type: :fulltext}, output + assert_match %r{add_index "key_tests", \["pizza"\], name: "index_key_tests_on_pizza", using: :btree}, output end end @@ -362,7 +360,7 @@ class SchemaDumperDefaultsTest < ActiveRecord::TestCase teardown do return unless @connection - @connection.execute 'DROP TABLE defaults' if @connection.table_exists? 'defaults' + @connection.drop_table 'defaults', if_exists: true end def test_schema_dump_defaults_with_universally_supported_types |