aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2017-05-26 09:30:56 +0930
committerGitHub <noreply@github.com>2017-05-26 09:30:56 +0930
commit881823176a3fcaa3711900f2cdfd66b11a6df18a (patch)
tree89942a2a00a899bf80f3eca498b1ffe525cf2466
parent89725a4bc7b716c7bfb621e5ec5abce017182a7d (diff)
parentf3d3f5e9e774e5c75e97a099676e35942747a7fd (diff)
downloadrails-881823176a3fcaa3711900f2cdfd66b11a6df18a.tar.gz
rails-881823176a3fcaa3711900f2cdfd66b11a6df18a.tar.bz2
rails-881823176a3fcaa3711900f2cdfd66b11a6df18a.zip
Merge pull request #29221 from koic/remove_duplicate_migration_test
Remove a duplicate test of migration_test in AR
-rw-r--r--activerecord/test/cases/migration_test.rb27
1 files changed, 0 insertions, 27 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb
index da7875187a..57f94950f9 100644
--- a/activerecord/test/cases/migration_test.rb
+++ b/activerecord/test/cases/migration_test.rb
@@ -402,33 +402,6 @@ class MigrationTest < ActiveRecord::TestCase
ActiveRecord::Migrator.up(migrations_path)
end
- def test_migration_sets_internal_metadata_even_when_fully_migrated
- current_env = ActiveRecord::ConnectionHandling::DEFAULT_ENV.call
- migrations_path = MIGRATIONS_ROOT + "/valid"
- old_path = ActiveRecord::Migrator.migrations_paths
- ActiveRecord::Migrator.migrations_paths = migrations_path
-
- ActiveRecord::Migrator.up(migrations_path)
- assert_equal current_env, ActiveRecord::InternalMetadata[:environment]
-
- original_rails_env = ENV["RAILS_ENV"]
- original_rack_env = ENV["RACK_ENV"]
- ENV["RAILS_ENV"] = ENV["RACK_ENV"] = "foofoo"
- new_env = ActiveRecord::ConnectionHandling::DEFAULT_ENV.call
-
- refute_equal current_env, new_env
-
- sleep 1 # mysql by default does not store fractional seconds in the database
-
- ActiveRecord::Migrator.up(migrations_path)
- assert_equal new_env, ActiveRecord::InternalMetadata[:environment]
- ensure
- ActiveRecord::Migrator.migrations_paths = old_path
- ENV["RAILS_ENV"] = original_rails_env
- ENV["RACK_ENV"] = original_rack_env
- ActiveRecord::Migrator.up(migrations_path)
- end
-
def test_internal_metadata_stores_environment_when_other_data_exists
ActiveRecord::InternalMetadata.delete_all
ActiveRecord::InternalMetadata[:foo] = "bar"