9622aa5acdea1738417d6b5950fbdc4d44d022bc
4 const assert
= require('assert');
5 const template
= require('../../../src/template/admin-ticket-html');
6 const Config
= require('../../../config');
7 const StubLogger
= require('../../stub-logger');
8 const lint
= require('html-minifier-lint').lint
; // eslint-disable-line node/no-unpublished-require
10 const stubLogger
= new StubLogger();
12 function lintHtml(html
) {
13 const result
= lint(html
);
14 stubLogger
.debug('validHtml', '', { result
, html
});
18 describe('Admin Ticket HTML Template', function () {
20 beforeEach(function () {
28 isManuallyAdded: false,
29 profiles: ['https://example.com/'],
35 isManuallyAdded: true,
42 isManuallyAdded: false,
49 isManuallyAdded: false,
56 isManuallyAdded: false,
61 'https://example.com': {
66 isManuallyAdded: false,
67 profiles: ['https://example.com/'],
71 profiles: ['https://example.com/'],
74 config
= new Config('test');
76 it('renders', function () {
77 const result
= template(ctx
, config
);
81 it('covers branches', function () {
82 delete ctx
.profilesScopes
;
83 const result
= template(ctx
, config
);
87 }); // Admin Ticket HTML Template