diff options
author | Prathamesh Sonpatki <csonpatki@gmail.com> | 2016-02-02 12:09:25 +0530 |
---|---|---|
committer | Prathamesh Sonpatki <csonpatki@gmail.com> | 2016-02-12 13:45:41 +0530 |
commit | 5d643d365ee656ff93517c649578545c7cc280c3 (patch) | |
tree | 490038c74d6b78b1f887e4651a5b930c319cf825 /activerecord/test/cases | |
parent | 8925e37fdcc37f4ff2ab2d55168719bbe9386ebf (diff) | |
download | rails-5d643d365ee656ff93517c649578545c7cc280c3.tar.gz rails-5d643d365ee656ff93517c649578545c7cc280c3.tar.bz2 rails-5d643d365ee656ff93517c649578545c7cc280c3.zip |
Correctly show deprecation warning for incompatible migrations
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/migration/compatibility_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/activerecord/test/cases/migration/compatibility_test.rb b/activerecord/test/cases/migration/compatibility_test.rb index 6d5b6243db..d8f5b33542 100644 --- a/activerecord/test/cases/migration/compatibility_test.rb +++ b/activerecord/test/cases/migration/compatibility_test.rb @@ -101,6 +101,18 @@ module ActiveRecord assert connection.columns(:testings).find { |c| c.name == 'created_at' }.null assert connection.columns(:testings).find { |c| c.name == 'updated_at' }.null end + + def test_legacy_migrations_get_deprecation_warning_when_run + migration = Class.new(ActiveRecord::Migration) { + def up + add_column :testings, :baz, :string + end + } + + assert_deprecated do + migration.migrate :up + end + end end end end |