Invalidate cache before cleaning db in tests after context
This commit is contained in:
parent
78a0d27e98
commit
72018278a4
|
@ -4,18 +4,18 @@ RSpec.configure do |config|
|
||||||
end
|
end
|
||||||
|
|
||||||
config.append_after(:context) do
|
config.append_after(:context) do
|
||||||
DatabaseCleaner.clean_with(:truncation)
|
DatabaseCleaner.clean_with(:truncation, cache_tables: false)
|
||||||
end
|
end
|
||||||
|
|
||||||
config.before(:each) do
|
config.before(:each) do
|
||||||
DatabaseCleaner.strategy = :transaction
|
DatabaseCleaner.strategy = :transaction
|
||||||
end
|
end
|
||||||
|
|
||||||
config.before(:each, js: true) do
|
config.before(:each, :js) do
|
||||||
DatabaseCleaner.strategy = :truncation
|
DatabaseCleaner.strategy = :truncation
|
||||||
end
|
end
|
||||||
|
|
||||||
config.before(:each, truncate: true) do
|
config.before(:each, :truncate) do
|
||||||
DatabaseCleaner.strategy = :truncation
|
DatabaseCleaner.strategy = :truncation
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue