diff --git a/models/asset.js b/models/asset.js index de7cf8e65..eb55094ac 100644 --- a/models/asset.js +++ b/models/asset.js @@ -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); diff --git a/tests/asset.js b/tests/asset.js index 14ab23125..187a9f1e7 100644 --- a/tests/asset.js +++ b/tests/asset.js @@ -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