diff options
author | Felix Hammerl <fhammerl@thoughtworks.com> | 2016-03-03 12:25:25 +0100 |
---|---|---|
committer | Felix Hammerl <fhammerl@thoughtworks.com> | 2016-03-09 15:36:10 +0100 |
commit | 23b175742f20d96e5b5d3d9cfcc0ed7067197f92 (patch) | |
tree | 224e5d536b9a6c4859671b2cff57f1f60236ef9f /web-ui/test/spec/helpers/sanitizer.spec.js | |
parent | d2d6fb98b909021efa435411ec95f554769fa9c9 (diff) |
Issue #617: Highlight search terms by altering mail content
Diffstat (limited to 'web-ui/test/spec/helpers/sanitizer.spec.js')
-rw-r--r-- | web-ui/test/spec/helpers/sanitizer.spec.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/web-ui/test/spec/helpers/sanitizer.spec.js b/web-ui/test/spec/helpers/sanitizer.spec.js index acd4b2b2..b553583e 100644 --- a/web-ui/test/spec/helpers/sanitizer.spec.js +++ b/web-ui/test/spec/helpers/sanitizer.spec.js @@ -25,6 +25,12 @@ define(['helpers/sanitizer'], function (sanitizer) { var output = sanitizer.purifyText('123<a>asd</a>'); expect(output).toEqual(expectedOutput); }); + + it('should leave highlighted text untouched', function () { + var expectedOutput = '<em class="search-highlight">123<a>asd</a></em>'; + var output = sanitizer.purifyText('<em class="search-highlight">123<a>asd</a></em>'); + expect(output).toEqual(expectedOutput); + }); }); describe('sanitizer.sanitize', function () { |