1
0
Fork 0
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:
Roberto Miranda 2019-04-02 17:50:28 +01:00
parent 900e566a6b
commit 1c7dcffb64

View file

@ -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