add initial support for api endpoint basic auth, updated dependencies
[squeep-authentication-module] / test / lib / template / ia-html.js
1 /* eslint-env mocha */
2 'use strict';
3
4 const assert = require('assert');
5 const { IAHTML } = require('../../../lib/template');
6 const lintHtml = require('../../lint-html');
7
8 describe('Template IAHTML', function () {
9 let ctx, options;
10 beforeEach(function () {
11 ctx = {};
12 options = {
13 manager: {
14 pageTitle: 'page',
15 },
16 dingus: {
17 selfBaseUrl: 'https://example.com/',
18 },
19 };
20 });
21
22 it('renders', function () {
23 ctx.errors = ['an error', 'another error'];
24 const result = IAHTML(ctx, options);
25 lintHtml(result);
26 assert(result);
27 });
28
29 it('covers empty error', function () {
30 const result = IAHTML(ctx, options);
31 lintHtml(result);
32 assert(result);
33 });
34
35 });