--- /dev/null
+/* eslint-env mocha */
+'use strict';
+
+const assert = require('assert');
+const { SettingsHTML } = require('../../../lib/template');
+const stubLogger = require('../../stub-logger');
+const lintHtml = require('../../lint-html');
+
+describe('Template SettingsHTML', function () {
+ let ctx, options;
+ beforeEach(function () {
+ ctx = {};
+ options = {
+ authenticator: {
+ otpBlurb: ['otp info'],
+ },
+ manager: {
+ pageTitle: 'page',
+ },
+ dingus: {
+ selfBaseUrl: 'https://example.com/',
+ },
+ };
+ });
+
+ it('renders, no otp', async function () {
+ ctx.errors = ['an error', 'another error'];
+ ctx.notifications = ['a notice']
+ const result = SettingsHTML(ctx, options);
+ await lintHtml(result);
+ assert(result);
+ });
+
+ it('covers, otp', async function () {
+ ctx.otpKey = '1234567890123456789012';
+ const result = SettingsHTML(ctx, options);
+ await lintHtml(result);
+ assert(result);
+ });
+
+ it('covers, otp confirm', async function () {
+ ctx.otpConfirmKey = '1234567890123456789012';
+ ctx.otpConfirmBox = 'boxboxbox';
+ ctx.authenticationId = 'identifier';
+ const result = SettingsHTML(ctx, options);
+ await lintHtml(result);
+ assert(result);
+ });
+
+ it('covers empty error', async function () {
+ const result = SettingsHTML(ctx, options);
+ await lintHtml(result);
+ assert(result);
+ });
+
+});