Linting and clarifying tests

This commit is contained in:
David Erwin
2016-11-05 11:18:18 -04:00
parent a6b2215a4b
commit 712841679d
2 changed files with 11 additions and 12 deletions
+1 -1
View File
@@ -77,7 +77,7 @@ AssetSchema.statics.upsert = function(data) {
// Perform the upsert against the id field.
let updatePromise = Asset.update({id: data.id}, data, {upsert: true})
.then((updateRes) => {
.then(() => {
// Pull the freshly minted asset out and return.
return Asset.findById(data.id);
+10 -11
View File
@@ -5,17 +5,16 @@ const expect = require('chai').expect;
let chai = require('chai');
let chaiHttp = require('chai-http');
let server = require('../app');
let should = chai.should();
chai.use(chaiHttp);
var fixture = {
"url": "simple",
"type": "article",
"headline": "The Total Perspective Vortex",
"summary": "You are an insignificant dot on an insignificant dot.",
"section": "Everything",
"authors": ["Ford Prefect"]
'url': 'simple',
'type': 'article',
'headline': 'The Total Perspective Vortex',
'summary': 'You are an insignificant dot on an insignificant dot.',
'section': 'Everything',
'authors': ['Ford Prefect']
};
@@ -24,8 +23,8 @@ describe('Asset', () => {
beforeEach((done) => {
// TODO: implement asset remove
Asset.removeAll({})
.then((asset) => {
return Asset.removeAll({})
.then(() => {
done();
});
@@ -94,8 +93,8 @@ describe('Asset', () => {
done();
});
});
});
});
});
});
}); // End describe /PUT Asset