/* global it:false */ /* global describe:false */ /* global before:false */ /* global after:false */ 'use strict'; const branding = require('../branding.js'), common = require('./common.js'), expect = require('expect.js'); describe('Branding', function () { const { setup, cleanup } = common; before(setup); after(cleanup); it ('can get default cloudron name', async function () { const name = await branding.getCloudronName(); expect(name).to.be('Cloudron'); }); it('can get default cloudron avatar', async function () { const avatar = await branding.getCloudronAvatar(); expect(avatar).to.be.a(Buffer); }); it('can render default footer', async function () { expect(await branding.renderFooter()).to.contain('(https://cloudron.io)'); }); it('can render footer', async function () { await branding.setFooter('BigFoot Inc'); expect(await branding.renderFooter()).to.be('BigFoot Inc'); }); it('can render footer with YEAR', async function () { await branding.setFooter('BigFoot Inc %YEAR%'); expect(await branding.renderFooter()).to.be('BigFoot Inc 2024'); }); });