Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/i18n_spec.rb')
-rw-r--r--spec/lib/gitlab/i18n_spec.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/lib/gitlab/i18n_spec.rb b/spec/lib/gitlab/i18n_spec.rb
index aae4a13bd73..b752d89bf0d 100644
--- a/spec/lib/gitlab/i18n_spec.rb
+++ b/spec/lib/gitlab/i18n_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Gitlab::I18n do
describe '.selectable_locales' do
include StubLanguagesTranslationPercentage
- it 'does not return languages with low translation levels' do
+ it 'does not return languages with default translation levels 60%' do
stub_languages_translation_percentage(pt_BR: 0, en: 100, es: 65)
expect(described_class.selectable_locales).to eq({
@@ -16,6 +16,12 @@ RSpec.describe Gitlab::I18n do
'es' => 'Spanish - espaƱol'
})
end
+
+ it 'does not return languages with less than 100% translation levels' do
+ stub_languages_translation_percentage(pt_BR: 0, en: 100, es: 65)
+
+ expect(described_class.selectable_locales(100)).to eq({ 'en' => 'English' })
+ end
end
describe '.locale=' do