1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Don't drop_table before schema cache tests

Since 5cab34449, `drop_table` clears schema cache.
This commit is contained in:
Ryuta Kamizono 2019-06-13 13:41:57 +09:00
parent 5cab344494
commit 75eb3d0cec

View file

@ -218,8 +218,9 @@ module ApplicationTests
rails %w(generate model post title:string)
rails %w(db:migrate db:schema:cache:dump)
require "#{app_path}/config/environment"
ActiveRecord::Base.connection.drop_table("posts") # force drop posts table for test.
assert ActiveRecord::Base.connection.schema_cache.data_sources("posts")
ensure
ActiveRecord::Base.connection.drop_table("posts", if_exists: true) # force drop posts table for test.
end
test "expire schema cache dump" do