mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add migration in case of db:drop assertion
This commit is contained in:
parent
900e566a6b
commit
1c7dcffb64
1 changed files with 8 additions and 1 deletions
|
@ -558,8 +558,15 @@ module ApplicationTests
|
|||
Dir.chdir(app_path) do
|
||||
rails "generate", "model", "book", "title:string"
|
||||
output = rails("db:prepare")
|
||||
|
||||
assert_match(/CreateBooks: migrated/, output)
|
||||
|
||||
output = rails("db:drop")
|
||||
assert_match(/Dropped database/, output)
|
||||
|
||||
rails "generate", "model", "recipe", "title:string"
|
||||
output = rails("db:prepare")
|
||||
assert_match(/CreateBooks: migrated/, output)
|
||||
assert_match(/CreateRecipes: migrated/, output)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue