mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add test missed by a03ea684ef
This commit is contained in:
parent
a03ea684ef
commit
b7d7e0b15e
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue