Add helper for language

pull/32396/head
Matt Jankowski 2024-10-23 12:20:24 -04:00
parent 0b790f24c7
commit 8dd9ea0a63
1 changed files with 6 additions and 2 deletions

View File

@ -13,8 +13,8 @@ RSpec.describe 'Settings preferences other page' do
expect(page)
.to have_private_cache_control
check LanguagesHelper::SUPPORTED_LOCALES[:es].last
check LanguagesHelper::SUPPORTED_LOCALES[:fr].last
check language_field(:es)
check language_field(:fr)
check mark_sensitive_field
expect { save_changes }
@ -31,4 +31,8 @@ RSpec.describe 'Settings preferences other page' do
def mark_sensitive_field
I18n.t('simple_form.labels.defaults.setting_default_sensitive')
end
def language_field(key)
LanguagesHelper::SUPPORTED_LOCALES[key].last
end
end