X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fsrc%2Ftemplate%2Fadmin-overview-html.js;fp=test%2Fsrc%2Ftemplate%2Fadmin-overview-html.js;h=5fa0a0e1bb903d303052e2de4ceecf846b32b9bf;hb=9696c012e6b9a6c58904baa397ca0ebf78112316;hp=0000000000000000000000000000000000000000;hpb=f59e918f3aba3a218c94a252072801fc40527647;p=websub-hub diff --git a/test/src/template/admin-overview-html.js b/test/src/template/admin-overview-html.js new file mode 100644 index 0000000..5fa0a0e --- /dev/null +++ b/test/src/template/admin-overview-html.js @@ -0,0 +1,30 @@ +/* eslint-env mocha */ +'use strict'; + +const assert = require('assert'); +const template = require('../../../src/template/admin-overview-html'); +const Config = require('../../../config'); +const config = new Config('test'); + +describe('Admin Overview HTML Template', function () { + let ctx; + + beforeEach(function () { + ctx = {}; + }); + + it('covers missing topics', function () { + const result = template(ctx, config); + assert(result); + }); + it('covers single topic', function () { + ctx.topics = [{}]; + const result = template(ctx, config); + assert(result); + }); + it('covers plural topics', function () { + ctx.topics = [{}, {}, {}]; + const result = template(ctx, config); + assert(result); + }); +});