Maintenance: Fix issue with locale handling in tests.

This commit is contained in:
Martin Gruner 2021-09-14 12:24:37 +02:00 committed by Dominik Klein
parent f4c06f088e
commit d57dadb2fb

View file

@ -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