mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-21 21:57:19 +00:00
Add helper for language
This commit is contained in:
parent
0b790f24c7
commit
8dd9ea0a63
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue