summaryrefslogtreecommitdiff
path: root/spec/helpers/preferences_helper_spec.rb
diff options
context:
space:
mode:
authorFabian Schneider <fabbbbbi+git@googlemail.com>2019-02-20 22:58:53 +0000
committerStan Hu <stanhu@gmail.com>2019-02-20 22:58:53 +0000
commita32fd49dd87414fcb8a9c979bd19b57355758c6e (patch)
treeb797cfd4d7315be01162301fbf6ea98b99692fa5 /spec/helpers/preferences_helper_spec.rb
parent09532e38bd7c612fd3d0e6ac7e17ec7bc648302f (diff)
downloadgitlab-ce-a32fd49dd87414fcb8a9c979bd19b57355758c6e.tar.gz
Move language setting to preferences
Diffstat (limited to 'spec/helpers/preferences_helper_spec.rb')
-rw-r--r--spec/helpers/preferences_helper_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/helpers/preferences_helper_spec.rb b/spec/helpers/preferences_helper_spec.rb
index 4c395248644..e0e8ebd0c3c 100644
--- a/spec/helpers/preferences_helper_spec.rb
+++ b/spec/helpers/preferences_helper_spec.rb
@@ -110,6 +110,13 @@ describe PreferencesHelper do
end
end
+ describe '#language_choices' do
+ it 'returns an array of all available languages' do
+ expect(helper.language_choices).to be_an(Array)
+ expect(helper.language_choices.map(&:second)).to eq(Gitlab::I18n.available_locales)
+ end
+ end
+
def stub_user(messages = {})
if messages.empty?
allow(helper).to receive(:current_user).and_return(nil)