Initial release
[websub-hub] / test / src / template / admin-overview-html.js
diff --git a/test/src/template/admin-overview-html.js b/test/src/template/admin-overview-html.js
new file mode 100644 (file)
index 0000000..5fa0a0e
--- /dev/null
@@ -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);
+  });
+});