You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
831 B
JavaScript
25 lines
831 B
JavaScript
'use strict';
|
|
|
|
const assert = require('assert');
|
|
const nconf = require('nconf');
|
|
|
|
const db = require('./mocks/databasemock');
|
|
const coverPhoto = require('../src/coverPhoto');
|
|
const meta = require('../src/meta');
|
|
|
|
describe('coverPhoto', () => {
|
|
it('should get default group cover', (done) => {
|
|
meta.config['groups:defaultCovers'] = '/assets/image1.png, /assets/image2.png';
|
|
const result = coverPhoto.getDefaultGroupCover('registered-users');
|
|
assert.equal(result, `${nconf.get('relative_path')}/assets/image2.png`);
|
|
done();
|
|
});
|
|
|
|
it('should get default default profile cover', (done) => {
|
|
meta.config['profile:defaultCovers'] = ' /assets/image1.png, /assets/image2.png ';
|
|
const result = coverPhoto.getDefaultProfileCover(1);
|
|
assert.equal(result, `${nconf.get('relative_path')}/assets/image2.png`);
|
|
done();
|
|
});
|
|
});
|