summaryrefslogtreecommitdiff
path: root/spec/frontend/lib/utils/text_utility_spec.js
diff options
context:
space:
mode:
authorConstance Okoghenun <cokoghenun@gitlab.com>2019-04-12 15:32:24 +0000
committerClement Ho <clemmakesapps@gmail.com>2019-04-12 15:32:24 +0000
commita3966d92cff14f7baf1f4f94902461480c9023de (patch)
tree9e4367320028d52f9450b0f3d5f80e3297a32a2b /spec/frontend/lib/utils/text_utility_spec.js
parented7a558c79a883d3d70d81f08db283d97b4bd90d (diff)
downloadgitlab-ce-a3966d92cff14f7baf1f4f94902461480c9023de.tar.gz
CE backport of Add Snowplow tracking to notes
Bacport of Snowplow tracking for - Reply comment button - Start discussion and Comment buttons
Diffstat (limited to 'spec/frontend/lib/utils/text_utility_spec.js')
-rw-r--r--spec/frontend/lib/utils/text_utility_spec.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/frontend/lib/utils/text_utility_spec.js b/spec/frontend/lib/utils/text_utility_spec.js
index a63631e09d2..0878c1de095 100644
--- a/spec/frontend/lib/utils/text_utility_spec.js
+++ b/spec/frontend/lib/utils/text_utility_spec.js
@@ -144,6 +144,12 @@ describe('text_utility', () => {
});
});
+ describe('slugifyWithUnderscore', () => {
+ it('should replaces whitespaces with underscore and convert to lower case', () => {
+ expect(textUtils.slugifyWithUnderscore('My Input String')).toEqual('my_input_string');
+ });
+ });
+
describe('truncateNamespace', () => {
it(`should return the root namespace if the namespace only includes one level`, () => {
expect(textUtils.truncateNamespace('a / b')).toBe('a');