about summary refs log tree commit diff
path: root/spec/helpers
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2022-02-13 22:15:26 -0600
committerStarfall <us@starfall.systems>2022-02-13 22:15:26 -0600
commitc0341f06be5310a00b85a5d48fa80891d47c6710 (patch)
tree907ef7f787f8bd446a6d9be1448a8bcff74e5a08 /spec/helpers
parent169688aa9f2a69ac3d36332c833e9cad43b5f7a5 (diff)
parent6f78c66fe01921a4e7e01aa6e2386a5fce7f3afd (diff)
Merge remote-tracking branch 'glitch/main'
Not at all sure where the admin UI is going to display English language
names now but OK.
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/languages_helper_spec.rb18
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