about summary refs log tree commit diff
path: root/spec/helpers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-09-08 12:32:22 +0200
committerGitHub <noreply@github.com>2017-09-08 12:32:22 +0200
commit1caf11ddcc029d9e7735ab3b90607ab2d6973034 (patch)
treef4642058d59360ea44ddf937c22b3835077719a6 /spec/helpers
parent95f018a3d4f02ff4ce77d7b1cfa9a79fce3ce99a (diff)
Fix language filter codes (#4841)
* Fix language filter codes

CLD3 returns BCP-47 language identifier, filter settings expect
identifiers in the ISO 639-1 format. Convert between formats,
and exclude duplicate languages from filter choices (zh-CN->zh)

* Fix zh name
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/settings_helper_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/helpers/settings_helper_spec.rb b/spec/helpers/settings_helper_spec.rb
index 5a51e0ef1..092c37583 100644
--- a/spec/helpers/settings_helper_spec.rb
+++ b/spec/helpers/settings_helper_spec.rb
@@ -4,10 +4,10 @@ require 'rails_helper'
 
 describe SettingsHelper do
   describe 'the HUMAN_LOCALES constant' do
-    it 'has the same number of keys as I18n locales exist' do
+    it 'includes all I18n locales' do
       options = I18n.available_locales
 
-      expect(described_class::HUMAN_LOCALES.keys).to eq(options)
+      expect(described_class::HUMAN_LOCALES.keys).to include(*options)
     end
   end