From 6cbce23c54e6e6159a06797c88ed58b9729d0730 Mon Sep 17 00:00:00 2001 From: Rolf Schmidt Date: Wed, 7 Jul 2021 13:46:21 +0000 Subject: [PATCH] Maintenance: Fix failing database cleanup for custom development. --- spec/rails_helper.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 1b53554b4..91ef32706 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -25,13 +25,8 @@ require 'rspec/rails' # Dir[Rails.root.join('spec/support/**/*.rb')].sort.each { |f| require f } -# Checks if the database schema is up-to-date and re-creates the database if needed. -ActiveRecord::Migration.maintain_test_schema! - -# Since maintain_test_schema! may provide an unseeded database, but tests rely on the seeding. -if User.count.zero? - Rake::Task['db:seed'].execute -end +# Reset database to be ready for tests +Rake::Task['zammad:db:reset'].execute # make sure that all migrations of linked packages are executed Package::Migration.linked