From d57dadb2fb4754db1d7f6502ad49913762e74918 Mon Sep 17 00:00:00 2001 From: Martin Gruner Date: Tue, 14 Sep 2021 12:24:37 +0200 Subject: [PATCH] Maintenance: Fix issue with locale handling in tests. --- spec/db/migrate/issue_1219_zhtw_locale_typo_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 5b10c92bb..219238f75 100644 --- a/spec/db/migrate/issue_1219_zhtw_locale_typo_spec.rb +++ b/spec/db/migrate/issue_1219_zhtw_locale_typo_spec.rb @@ -3,12 +3,12 @@ require 'rails_helper' RSpec.describe Issue1219ZhtwLocaleTypo, type: :db_migration do - let(:locale) { create(:locale, locale: premigrate_locale, name: 'Chinese (Tradi.) (正體中文)') } + let(:locale) { create(:locale, locale: premigrate_locale, name: 'Chinese (Trad.) (繁體中文)') } let(:translation) { create(:translation, locale: premigrate_locale) } let(:user) { create(:user, preferences: { locale: premigrate_locale }) } before do - Locale.find_by(name: 'Chinese (Tradi.) (正體中文)')&.destroy + Locale.find_by(locale: %w[zh-tw zj-tw])&.destroy stub_const("#{described_class}::CURRENT_VERSION", version) end