4b8c0dd832ef9cd28d3e996848ffae3c1746ca60
4 const assert
= require('assert');
5 const template
= require('../../../src/template/admin-topic-details-html');
6 const Config
= require('../../../config');
7 const config
= new Config('test');
9 describe('Admin Topic Details HTML Template', function () {
12 beforeEach(function () {
21 it('renders', function () {
22 const result
= template(ctx
, config
);
25 it('covers null topic', function () {
27 ctx
.subscriptions
= null;
28 const result
= template(ctx
, config
);
31 it('covers missing subscriptions', function () {
32 delete ctx
.subscriptions
;
33 const result
= template(ctx
, config
);
36 it('covers plural subscriptions', function () {
37 ctx
.subscriptions
= [{}, {}, {}];
38 const result
= template(ctx
, config
);