summaryrefslogtreecommitdiff
path: root/spec/javascripts/lib
diff options
context:
space:
mode:
authorClement Ho <ClemMakesApps@gmail.com>2018-01-08 13:01:53 -0600
committerClement Ho <ClemMakesApps@gmail.com>2018-01-08 13:01:53 -0600
commita2b80c89d8b6b38eb1f5c59109006ea48a2e9e5a (patch)
tree2d22d33ab68a57d4c934f0c44b43621f482cb192 /spec/javascripts/lib
parent65791c9c2a234685e297e334dd3d56e56858f27c (diff)
parent1d7b46062feb1d93dd3efaf6ba4d5d934068342c (diff)
downloadgitlab-ce-move-markdown-preview.tar.gz
Merge branch 'master' into move-markdown-previewmove-markdown-preview
Diffstat (limited to 'spec/javascripts/lib')
-rw-r--r--spec/javascripts/lib/utils/text_utility_spec.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/javascripts/lib/utils/text_utility_spec.js b/spec/javascripts/lib/utils/text_utility_spec.js
index 1f46c225071..6f8dad6b835 100644
--- a/spec/javascripts/lib/utils/text_utility_spec.js
+++ b/spec/javascripts/lib/utils/text_utility_spec.js
@@ -62,4 +62,14 @@ describe('text_utility', () => {
expect(textUtils.slugify('João')).toEqual('joão');
});
});
+
+ describe('stripeHtml', () => {
+ it('replaces html tag with the default replacement', () => {
+ expect(textUtils.stripeHtml('This is a text with <p>html</p>.')).toEqual('This is a text with html.');
+ });
+
+ it('replaces html tags with the provided replacement', () => {
+ expect(textUtils.stripeHtml('This is a text with <p>html</p>.', ' ')).toEqual('This is a text with html .');
+ });
+ });
});