5fa0a0e1bb903d303052e2de4ceecf846b32b9bf
[websub-hub] / test / src / template / admin-overview-html.js
1 /* eslint-env mocha */
2 'use strict';
3
4 const assert = require('assert');
5 const template = require('../../../src/template/admin-overview-html');
6 const Config = require('../../../config');
7 const config = new Config('test');
8
9 describe('Admin Overview HTML Template', function () {
10 let ctx;
11
12 beforeEach(function () {
13 ctx = {};
14 });
15
16 it('covers missing topics', function () {
17 const result = template(ctx, config);
18 assert(result);
19 });
20 it('covers single topic', function () {
21 ctx.topics = [{}];
22 const result = template(ctx, config);
23 assert(result);
24 });
25 it('covers plural topics', function () {
26 ctx.topics = [{}, {}, {}];
27 const result = template(ctx, config);
28 assert(result);
29 });
30 });