Merge pull request #6712 from jaswilli/issue-6710

Fix test conflicts
This commit is contained in:
Hannah Wolfe 2016-04-13 19:40:04 +01:00
commit 21a4bdfd62
4 changed files with 27 additions and 9 deletions

View File

@ -230,10 +230,10 @@ var _ = require('lodash'),
},
coverage_all: {
src: [
'core/test/unit',
'core/server/apps',
'core/test/integration',
'core/test/functional'
'core/server/apps',
'core/test/functional',
'core/test/unit'
],
options: {
coverageFolder: 'core/test/coverage/all',

View File

@ -232,6 +232,8 @@ describe('Channel Routes', function () {
}).catch(done);
});
after(testUtils.teardown);
it('should 404 for /tag/ route', function (done) {
request.get('/tag/')
.expect('Cache-Control', testUtils.cacheRules.private)

View File

@ -17,6 +17,10 @@ var should = require('should'),
i18n.init();
describe('Config', function () {
before(function () {
configUtils.restore();
});
afterEach(function () {
configUtils.restore();
});

View File

@ -245,7 +245,9 @@ DataGenerator.forKnex = (function () {
clients;
function createBasic(overrides) {
return _.defaults(overrides, {
var newObj = _.cloneDeep(overrides);
return _.defaults(newObj, {
uuid: uuid.v4(),
created_by: 1,
created_at: new Date(),
@ -255,7 +257,9 @@ DataGenerator.forKnex = (function () {
}
function createPost(overrides) {
return _.defaults(overrides, {
var newObj = _.cloneDeep(overrides);
return _.defaults(newObj, {
uuid: uuid.v4(),
status: 'published',
html: overrides.markdown,
@ -291,7 +295,9 @@ DataGenerator.forKnex = (function () {
}
function createUser(overrides) {
return _.defaults(overrides, {
var newObj = _.cloneDeep(overrides);
return _.defaults(newObj, {
uuid: uuid.v4(),
status: 'active',
created_by: 1,
@ -316,7 +322,9 @@ DataGenerator.forKnex = (function () {
}
function createAppField(overrides) {
return _.defaults(overrides, {
var newObj = _.cloneDeep(overrides);
return _.defaults(newObj, {
uuid: uuid.v4(),
created_by: 1,
created_at: new Date(),
@ -328,7 +336,9 @@ DataGenerator.forKnex = (function () {
}
function createAppSetting(overrides) {
return _.defaults(overrides, {
var newObj = _.cloneDeep(overrides);
return _.defaults(newObj, {
uuid: uuid.v4(),
app_id: 1,
created_by: 1,
@ -337,7 +347,9 @@ DataGenerator.forKnex = (function () {
}
function createToken(overrides) {
return _.defaults(overrides, {
var newObj = _.cloneDeep(overrides);
return _.defaults(newObj, {
token: uuid.v4(),
client_id: 1,
expires: Date.now() + globalUtils.ONE_DAY_MS