From b7d7e0b15e4c6aaad9fbb408d7596fffa796e843 Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Mon, 22 Dec 2014 14:05:35 -0700 Subject: Add test missed by a03ea684efc3505647cf0327a501aa2dbb591ad2 --- railties/test/generators/migration_generator_test.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'railties/test') diff --git a/railties/test/generators/migration_generator_test.rb b/railties/test/generators/migration_generator_test.rb index 0803699968..413d457d54 100644 --- a/railties/test/generators/migration_generator_test.rb +++ b/railties/test/generators/migration_generator_test.rb @@ -91,8 +91,9 @@ class MigrationGeneratorTest < Rails::Generators::TestCase assert_migration "db/migrate/#{migration}.rb" do |content| assert_method :change, content do |change| - assert_match(/remove_foreign_key :books, :authors/, change) - assert_no_match(/remove_foreign_key :books, :distributors/, change) + assert_match(/remove_reference :books, :author,.*\sforeign_key: true/, change) + assert_match(/remove_reference :books, :distributor/, change) # sanity check + assert_no_match(/remove_reference :books, :distributor,.*\sforeign_key: true/, change) end end end -- cgit v1.2.3