diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-06-13 23:51:11 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2019-06-13 23:51:11 +0900 |
commit | 5a8714e559dd4d4058d23bd0d427a9d3e6022617 (patch) | |
tree | 25cd6a2ef1fd4b16eb7649e0f3915eb01cdd2da8 | |
parent | e9e7e7d3fd70fb31224b9d1234b04cf41249ff2d (diff) | |
download | rails-5a8714e559dd4d4058d23bd0d427a9d3e6022617.tar.gz rails-5a8714e559dd4d4058d23bd0d427a9d3e6022617.tar.bz2 rails-5a8714e559dd4d4058d23bd0d427a9d3e6022617.zip |
Ensure to reset migration version after testing migration
"schema_migrations" table may be hard dropped before, so the reset
migration version should be done in ensure block.
https://buildkite.com/rails/rails/builds/61697#18d6f3ac-2257-4f4b-8efc-4010464c4d9a/999-1011
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/uuid_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/uuid_test.rb b/activerecord/test/cases/adapters/postgresql/uuid_test.rb index 71b4d3298e..4b8aeb33f6 100644 --- a/activerecord/test/cases/adapters/postgresql/uuid_test.rb +++ b/activerecord/test/cases/adapters/postgresql/uuid_test.rb @@ -285,7 +285,6 @@ class PostgresqlUUIDGenerationTest < ActiveRecord::PostgreSQLTestCase uses_transaction \ def test_schema_dumper_for_uuid_primary_key_default_in_legacy_migration - ActiveRecord::SchemaMigration.delete_all @verbose_was = ActiveRecord::Migration.verbose ActiveRecord::Migration.verbose = false @@ -302,6 +301,7 @@ class PostgresqlUUIDGenerationTest < ActiveRecord::PostgreSQLTestCase ensure drop_table "pg_uuids_4" ActiveRecord::Migration.verbose = @verbose_was + ActiveRecord::SchemaMigration.delete_all end end @@ -335,7 +335,6 @@ class PostgresqlUUIDTestNilDefault < ActiveRecord::PostgreSQLTestCase uses_transaction \ def test_schema_dumper_for_uuid_primary_key_with_default_nil_in_legacy_migration - ActiveRecord::SchemaMigration.delete_all @verbose_was = ActiveRecord::Migration.verbose ActiveRecord::Migration.verbose = false @@ -352,6 +351,7 @@ class PostgresqlUUIDTestNilDefault < ActiveRecord::PostgreSQLTestCase ensure drop_table "pg_uuids_4" ActiveRecord::Migration.verbose = @verbose_was + ActiveRecord::SchemaMigration.delete_all end end |