diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-06-15 16:33:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-15 16:33:39 -0400 |
commit | 053db5096287c0d3a9597bff3f669e32a64cc387 (patch) | |
tree | 64827f0889d495d8841d47cea0848f6c9d3191cb /activerecord/test/cases | |
parent | 6e227ad3450328701247b4e66e7d6654121d7102 (diff) | |
parent | 28b54c6b479dde42d08dbfd9faa2e5fbfcadf86f (diff) | |
download | rails-053db5096287c0d3a9597bff3f669e32a64cc387.tar.gz rails-053db5096287c0d3a9597bff3f669e32a64cc387.tar.bz2 rails-053db5096287c0d3a9597bff3f669e32a64cc387.zip |
Merge pull request #29462 from kamipo/fix_dump_schema_information_with_empty_versions
Fix `dump_schema_information` with empty versions
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/schema_dumper_test.rb | 6 |
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 b5386ba801..4c81e825fa 100644 --- a/activerecord/test/cases/schema_dumper_test.rb +++ b/activerecord/test/cases/schema_dumper_test.rb @@ -17,6 +17,12 @@ class SchemaDumperTest < ActiveRecord::TestCase dump_all_table_schema [] end + def test_dump_schema_information_with_empty_versions + ActiveRecord::SchemaMigration.delete_all + schema_info = ActiveRecord::Base.connection.dump_schema_information + assert_no_match(/INSERT INTO/, schema_info) + end + def test_dump_schema_information_outputs_lexically_ordered_versions versions = %w{ 20100101010101 20100201010101 20100301010101 } versions.reverse_each do |v| |