Initial release
[websub-hub] / test / src / template / root-html.js
diff --git a/test/src/template/root-html.js b/test/src/template/root-html.js
new file mode 100644 (file)
index 0000000..f48cb08
--- /dev/null
@@ -0,0 +1,34 @@
+/* eslint-env mocha */
+'use strict';
+
+const assert = require('assert');
+const template = require('../../../src/template/root-html');
+const Config = require('../../../config');
+
+describe('Root HTML Template', function () {
+  let ctx, config;
+
+  beforeEach(function () {
+    ctx = {};
+    config = new Config('test');
+  });
+
+  it('renders', function () {
+    const result = template(ctx, config);
+    assert(result);
+  });
+
+  it('covers options', function () {
+    delete config.dingus.selfBaseUrl;
+    const result = template(ctx, config);
+    assert(result);
+  });
+
+  it('covers options', function () {
+    config.adminContactHTML = '<div>support</div>';
+    config.manager.publicHub = false;
+    const result = template(ctx, config);
+    assert(result);
+  });
+
+});