X-Git-Url: http://git.squeep.com/?p=websub-hub;a=blobdiff_plain;f=test%2Fsrc%2Ftemplate%2Ftemplate-helper.js;h=5a62a7c4b15f4d68a9c12f1a61461eda6c8c520d;hp=8c8579d1cc5a83b3d65b8acd2c232805d61097a8;hb=737fbd003d5c4dfea81b667ef906f1c106a60612;hpb=17b4ff9c1974842c02071d2cd02144d2e5a99eb5 diff --git a/test/src/template/template-helper.js b/test/src/template/template-helper.js index 8c8579d..5a62a7c 100644 --- a/test/src/template/template-helper.js +++ b/test/src/template/template-helper.js @@ -63,4 +63,19 @@ describe('Template Helper', function () { }); }); // renderSubscriptionRowHeader + describe('xmlEscape', function () { + it('ignores numbers', function () { + const result = th.xmlEscape(3); + assert.strictEqual(result, 3); + }); + it('ignores objects', function () { + const result = th.xmlEscape({}); + assert.strictEqual(result, undefined); + }); + it('escapes a thing', function () { + const result = th.xmlEscape('&'); + assert.strictEqual(result, '&'); + }); + }); // xmlEscape + });