From 45d0501ca6294af896b2db6428e8458c7614a2e1 Mon Sep 17 00:00:00 2001 From: Pau Perez Date: Tue, 2 Mar 2021 11:41:49 +0100 Subject: [PATCH] Fix old pending locale-related spec This is the correct behavior: if you set a language that is not available, it'll fallback to English. --- spec/features/admin/multilingual_spec.rb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/spec/features/admin/multilingual_spec.rb b/spec/features/admin/multilingual_spec.rb index 17ebb82615..9c5fea412c 100644 --- a/spec/features/admin/multilingual_spec.rb +++ b/spec/features/admin/multilingual_spec.rb @@ -35,16 +35,10 @@ feature 'Multilingual', js: true do end it 'fallbacks to default_locale' do - pending 'current spree core has a bug if not available locale is provided' - # undefined method `delete_if' for "translation missing: it.date.month_names":String - # inside core/app/views/spree/admin/shared/_translations.html.erb - - # I18n-js fallsback to 'en' visit spree.admin_dashboard_path(locale: 'it') - expect(get_i18n_locale).to eq 'it' + expect(get_i18n_locale).to eq 'en' expect(get_i18n_translation('spree_admin_overview_enterprises_header')).to eq 'My Enterprises' + expect(page).to have_content 'My Enterprises' expect(admin_user.locale).to be_nil - # This still is italian until we change enforce_available_locales to `true` - expect(page).to have_content 'Le Mie Aziende' end end