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
728 B
JavaScript
25 lines
728 B
JavaScript
8 years ago
|
'use strict';
|
||
|
|
||
|
var assert = require('assert');
|
||
|
var async = require('async');
|
||
|
|
||
|
var db = require('./mocks/databasemock');
|
||
|
var coverPhoto = require('../src/coverPhoto');
|
||
|
var meta = require('../src/meta');
|
||
|
|
||
|
describe('coverPhoto', function () {
|
||
|
it('should get default group cover', function (done) {
|
||
|
meta.config['groups:defaultCovers'] = 'image1.png,image2.png';
|
||
|
var result = coverPhoto.getDefaultGroupCover('registered-users');
|
||
|
assert.equal(result, 'image2.png');
|
||
|
done();
|
||
|
});
|
||
|
|
||
|
it('should get default default profile cover', function (done) {
|
||
|
meta.config['profile:defaultCovers'] = ' image1.png ,image2.png ';
|
||
|
var result = coverPhoto.getDefaultProfileCover(1);
|
||
|
assert.equal(result, 'image2.png');
|
||
|
done();
|
||
|
});
|
||
|
});
|