A platform for community discussion. Free, open, simple.
DEV: Clean up ThemeSettingsMigration records in test suite setup (#37376)
Régis Hanolb1d31caaef03
diff --git a/app/models/theme_field.rb b/app/models/theme_field.rbindex 7e1b20795a0..9d8bab100c6 100644--- a/app/models/theme_field.rb+++ b/app/models/theme_field.rb@@ -15,7 +15,7 @@ class ThemeField < ActiveRecord::Basedependent: :destroy,autosave: truehas_one :upload_reference, as: :target, dependent: :destroy- has_one :theme_settings_migration+ has_one :theme_settings_migration, dependent: :destroyvalidates :value, { length: { maximum: 1024**2 } }diff --git a/spec/rails_helper.rb b/spec/rails_helper.rbindex 77b39f9aca4..532d14aec04 100644--- a/spec/rails_helper.rb+++ b/spec/rails_helper.rb@@ -347,6 +347,7 @@ RSpec.configure do |config|SystemThemesManager.clear_system_theme_user_history!ThemeField.delete_all+ ThemeSettingsMigration.delete_allJavascriptCache.delete_allThemeSiteSetting.delete_allSiteSetting.refresh!