Просмотр исходного кода

Maintenance: Fix failing database cleanup for custom development.

Rolf Schmidt 3 лет назад
Родитель
Сommit
6cbce23c54
1 измененных файлов с 2 добавлено и 7 удалено
  1. 2 7
      spec/rails_helper.rb

+ 2 - 7
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