From 2d494ae4ce535d452d4ddfedec6713aa60fd0441 Mon Sep 17 00:00:00 2001 From: Martin Gruner Date: Wed, 15 Sep 2021 07:29:36 +0200 Subject: [PATCH] Follow-up: d57dadb2 - Maintenance: Fix issue with locale handling in tests. --- spec/db/migrate/issue_1219_zhtw_locale_typo_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/db/migrate/issue_1219_zhtw_locale_typo_spec.rb b/spec/db/migrate/issue_1219_zhtw_locale_typo_spec.rb index 219238f75..dfda471cc 100644 --- a/spec/db/migrate/issue_1219_zhtw_locale_typo_spec.rb +++ b/spec/db/migrate/issue_1219_zhtw_locale_typo_spec.rb @@ -8,7 +8,7 @@ RSpec.describe Issue1219ZhtwLocaleTypo, type: :db_migration do let(:user) { create(:user, preferences: { locale: premigrate_locale }) } before do - Locale.find_by(locale: %w[zh-tw zj-tw])&.destroy + Locale.where(locale: %w[zh-tw zj-tw]).each(&:destroy) stub_const("#{described_class}::CURRENT_VERSION", version) end