diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-12-22 14:05:35 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-12-22 14:05:35 -0700 |
commit | b7d7e0b15e4c6aaad9fbb408d7596fffa796e843 (patch) | |
tree | 34020ae6cb909438acef12c3a53ccc33e70dcb8a /railties/test | |
parent | a03ea684efc3505647cf0327a501aa2dbb591ad2 (diff) | |
download | rails-b7d7e0b15e4c6aaad9fbb408d7596fffa796e843.tar.gz rails-b7d7e0b15e4c6aaad9fbb408d7596fffa796e843.tar.bz2 rails-b7d7e0b15e4c6aaad9fbb408d7596fffa796e843.zip |
Add test missed by a03ea684efc3505647cf0327a501aa2dbb591ad2
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/migration_generator_test.rb | 5 |
1 files changed, 3 insertions, 2 deletions
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 |