diff options
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/languages_helper_spec.rb | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/spec/helpers/languages_helper_spec.rb b/spec/helpers/languages_helper_spec.rb index 6db617824..5587fc261 100644 --- a/spec/helpers/languages_helper_spec.rb +++ b/spec/helpers/languages_helper_spec.rb @@ -3,15 +3,21 @@ require 'rails_helper' describe LanguagesHelper do - describe 'the HUMAN_LOCALES constant' do - it 'includes all I18n locales' do - expect(described_class::HUMAN_LOCALES.keys).to include(*I18n.available_locales) + describe 'the SUPPORTED_LOCALES constant' do + it 'includes all i18n locales' do + expect(Set.new(described_class::SUPPORTED_LOCALES.keys + described_class::REGIONAL_LOCALE_NAMES.keys)).to include(*I18n.available_locales) end end - describe 'human_locale' do - it 'finds the human readable local description from a key' do - expect(helper.human_locale(:en)).to eq('English') + describe 'native_locale_name' do + it 'finds the human readable native name from a key' do + expect(helper.native_locale_name(:en)).to eq('English') + end + end + + describe 'standard_locale_name' do + it 'finds the human readable standard name from a key' do + expect(helper.standard_locale_name(:de)).to eq('German') end end end |