aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2014-08-15 01:27:50 +0900
committerAkira Matsuda <ronnie@dio.jp>2014-08-15 01:29:42 +0900
commitcf38bda8e2a16ce205ec88207687b8091ee67617 (patch)
tree4e21f292716cf41ce3fca810b41f16ca47a4d243 /activerecord/test
parentfdd4b73cb8ddf35c941b96033cab15e5080f54ac (diff)
downloadrails-cf38bda8e2a16ce205ec88207687b8091ee67617.tar.gz
rails-cf38bda8e2a16ce205ec88207687b8091ee67617.tar.bz2
rails-cf38bda8e2a16ce205ec88207687b8091ee67617.zip
Be sure to reset PK name renamed in the test
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/migration/columns_test.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/test/cases/migration/columns_test.rb b/activerecord/test/cases/migration/columns_test.rb
index 4e6d7963aa..e6aa901814 100644
--- a/activerecord/test/cases/migration/columns_test.rb
+++ b/activerecord/test/cases/migration/columns_test.rb
@@ -66,6 +66,9 @@ module ActiveRecord
def test_mysql_rename_column_preserves_auto_increment
rename_column "test_models", "id", "id_test"
assert_equal "auto_increment", connection.columns("test_models").find { |c| c.name == "id_test" }.extra
+ TestModel.reset_column_information
+ ensure
+ rename_column "test_models", "id_test", "id"
end
end