display history of topic updates on topic details page
[websub-hub] / test / src / template / admin-topic-details-html.js
index 4b8c0dd832ef9cd28d3e996848ffae3c1746ca60..7795c2b257e849cd9294903d08255f5880f832d7 100644 (file)
@@ -4,38 +4,46 @@
 const assert = require('assert');
 const template = require('../../../src/template/admin-topic-details-html');
 const Config = require('../../../config');
-const config = new Config('test');
+const lintHtml = require('../../lint-html');
 
 describe('Admin Topic Details HTML Template', function () {
-  let ctx;
+  let ctx, config;
 
   beforeEach(function () {
     ctx = {
+      params: {
+        topicId: '97dd5488-a303-11ec-97ab-0025905f714a',
+      },
       topic: {},
       subscriptions: [
         {},
       ],
     };
+    config = new Config('test');
   });
 
   it('renders', function () {
     const result = template(ctx, config);
+    lintHtml(result);
     assert(result);
   });
   it('covers null topic', function () {
     ctx.topic = null;
     ctx.subscriptions = null;
     const result = template(ctx, config);
+    lintHtml(result);
     assert(result);
   });
   it('covers missing subscriptions', function () {
     delete ctx.subscriptions;
     const result = template(ctx, config);
+    lintHtml(result);
     assert(result);
   });
   it('covers plural subscriptions', function () {
     ctx.subscriptions = [{}, {}, {}];
     const result = template(ctx, config);
+    lintHtml(result);
     assert(result);
   });
 });