diff options
author | Kushal Pandya <kushalspandya@gmail.com> | 2018-12-24 15:55:21 +0530 |
---|---|---|
committer | Kushal Pandya <kushalspandya@gmail.com> | 2019-01-22 14:07:46 +0530 |
commit | 9cce812af9e409d83f3c50b9453f3cd63bcfbe71 (patch) | |
tree | 34788fa7068310906808ec3f524258508226c668 /spec/helpers | |
parent | 60d3fe5804ccb17f0069b51464f5aa3dcc5f63d5 (diff) | |
download | gitlab-ce-9cce812af9e409d83f3c50b9453f3cd63bcfbe71.tar.gz |
Add `client_detection` helper to add browser and plaform flags
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/application_helper_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 4135f31e051..b81249a1e29 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -168,6 +168,21 @@ describe ApplicationHelper do end end + describe '#client_class_list' do + it 'returns string containing CSS classes representing client browser and platform' do + class_list = helper.client_class_list + expect(class_list).to eq('gl-browser-generic gl-platform-other') + end + end + + describe '#client_js_flags' do + it 'returns map containing JS flags representing client browser and platform' do + flags_list = helper.client_js_flags + expect(flags_list[:isGeneric]).to eq(true) + expect(flags_list[:isOther]).to eq(true) + end + end + describe '#autocomplete_data_sources' do let(:project) { create(:project) } let(:noteable_type) { Issue } |