- Created all Tests with Mocha: User + Todo tables
This commit is contained in:
@@ -2,6 +2,7 @@ var mongoose = require('mongoose');
|
||||
|
||||
const _ = require('lodash');
|
||||
|
||||
const tools = require('../tools/general');
|
||||
|
||||
mongoose.Promise = global.Promise;
|
||||
mongoose.level = "F";
|
||||
@@ -69,8 +70,7 @@ TodoSchema.methods.toJSON = function () {
|
||||
|
||||
// console.log(todoObject);
|
||||
|
||||
return _.pick(todoObject, ['_id', 'userId', 'pos', 'category', 'descr', 'priority', 'completed', 'created_at', 'modify_at',
|
||||
'completed_at', 'expiring_at', 'enableExpiring', 'id_prev', 'id_next', 'progress', 'modified']);
|
||||
return _.pick(todoObject, tools.allfieldTodoWithId());
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user