tests: add footer tests

This commit is contained in:
Girish Ramakrishnan
2021-08-31 08:47:01 -07:00
parent 6027397961
commit ffc3c94d77
4 changed files with 67 additions and 3 deletions

30
src/test/branding-test.js Normal file
View File

@@ -0,0 +1,30 @@
/* global it:false */
/* global describe:false */
/* global before:false */
/* global after:false */
'use strict';
const branding = require('../branding.js'),
common = require('./common.js'),
constants = require('../constants.js'),
expect = require('expect.js');
describe('Branding', function () {
const { setup, cleanup } = common;
before(setup);
after(cleanup);
it('can render default footer', async function () {
expect(branding.renderFooter(constants.FOOTER)).to.contain('(https://cloudron.io)');
});
it('can render footer', async function () {
expect(branding.renderFooter('BigFoot Inc')).to.be('BigFoot Inc');
});
it('can render footer with YEAR', async function () {
expect(branding.renderFooter('BigFoot Inc %YEAR%')).to.be('BigFoot Inc 2021');
});
});