const result = th.renderTopicRow(topic, subscribers);
assert(result);
});
+ it('covers empty', function () {
+ topic = null;
+ subscribers = null;
+ const result = th.renderTopicRow(topic, subscribers);
+ assert(result);
+ });
it('covers no link', function () {
subscribers = [{}, {}];
const result = th.renderTopicRow(topic, subscribers, false);
const result = th.renderSubscriptionRow(subscription);
assert(result);
});
+ it('covers empty', function () {
+ const result = th.renderSubscriptionRow();
+ assert(result);
+ });
}); // renderSubscriptionRow
describe('renderSubscriptionRowHeader', function () {
describe('htmlFooter', function () {
it('covers', function () {
+ const result = th.htmlFooter(['foo', 'bar']);
+ assert(result);
+ });
+ it('covers default', function () {
const result = th.htmlFooter();
assert(result);
});
describe('htmlTemplate', function () {
let pagePathLevel, pageTitle, headElements, navLinks, main;
beforeEach(function () {
+ ctx = {};
pagePathLevel = 1;
pageTitle = 'title';
headElements = [];
main = [];
});
it('covers', function () {
- const result = th.htmlTemplate(pagePathLevel, pageTitle, headElements, navLinks, main);
+ const result = th.htmlTemplate(ctx, pagePathLevel, pageTitle, headElements, navLinks, main);
assert(result);
});
it('covers defaults', function () {
- const result = th.htmlTemplate(pagePathLevel, pageTitle);
+ const result = th.htmlTemplate(ctx, pagePathLevel, pageTitle);
+ assert(result);
+ });
+ it('covers user', function () {
+ ctx.session = {
+ authenticatedProfile: 'user',
+ };
+ const result = th.htmlTemplate(ctx, pagePathLevel, pageTitle);
+ assert(result);
+ });
+ it('covers user at root path', function () {
+ ctx.session = {
+ authenticatedIdentifier: 'user',
+ };
+ pagePathLevel = 0;
+ const result = th.htmlTemplate(ctx, pagePathLevel, pageTitle);
assert(result);
});
}); // htmlTemplate