mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-25 07:05:20 +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)
|
expect(page)
|
||||||
.to have_private_cache_control
|
.to have_private_cache_control
|
||||||
|
|
||||||
check LanguagesHelper::SUPPORTED_LOCALES[:es].last
|
check language_field(:es)
|
||||||
check LanguagesHelper::SUPPORTED_LOCALES[:fr].last
|
check language_field(:fr)
|
||||||
check mark_sensitive_field
|
check mark_sensitive_field
|
||||||
|
|
||||||
expect { save_changes }
|
expect { save_changes }
|
||||||
|
@ -31,4 +31,8 @@ RSpec.describe 'Settings preferences other page' do
|
||||||
def mark_sensitive_field
|
def mark_sensitive_field
|
||||||
I18n.t('simple_form.labels.defaults.setting_default_sensitive')
|
I18n.t('simple_form.labels.defaults.setting_default_sensitive')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def language_field(key)
|
||||||
|
LanguagesHelper::SUPPORTED_LOCALES[key].last
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue