From d8170d5d1cb36afb364628f162ab561f99f8f270 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 19 Apr 2017 13:09:16 -0400 Subject: [PATCH] fix tests --- src/posts/create.js | 8 ++++---- test/database/hash.js | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/posts/create.js b/src/posts/create.js index 6ec02e6fc7..09c4e9c9b7 100644 --- a/src/posts/create.js +++ b/src/posts/create.js @@ -104,10 +104,10 @@ module.exports = function (Posts) { plugins.fireHook('filter:post.get', { post: postData, uid: data.uid }, next); }); }, - function (postData, next) { - postData.isMain = isMain; - plugins.fireHook('action:post.save', { post: _.clone(postData) }); - next(null, postData); + function (data, next) { + data.post.isMain = isMain; + plugins.fireHook('action:post.save', { post: _.clone(data.post) }); + next(null, data.post); }, ], callback); }; diff --git a/test/database/hash.js b/test/database/hash.js index 65e365b7f3..7f9dc305d0 100644 --- a/test/database/hash.js +++ b/test/database/hash.js @@ -48,7 +48,6 @@ describe('Hash methods', function () { assert.ifError(err); db.getObject('emptyField', function (err, data) { assert.ifError(err); - console.log(data); done(); }); });