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:
authorKushal Pandya <kushalspandya@gmail.com>2018-12-24 13:25:21 +0300
committerKushal Pandya <kushalspandya@gmail.com>2019-01-22 11:37:46 +0300
commit9cce812af9e409d83f3c50b9453f3cd63bcfbe71 (patch)
tree34788fa7068310906808ec3f524258508226c668 /spec/helpers/application_helper_spec.rb
parent60d3fe5804ccb17f0069b51464f5aa3dcc5f63d5 (diff)
Add `client_detection` helper to add browser and plaform flags
Diffstat (limited to 'spec/helpers/application_helper_spec.rb')
-rw-r--r--spec/helpers/application_helper_spec.rb15
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 }