fix(core): test error

This commit is contained in:
OldHawk
2017-08-03 18:15:09 +08:00
parent 88dec6edc4
commit 840e498ce4
3 changed files with 52 additions and 52 deletions

View File

@@ -195,28 +195,28 @@ describe('User Model Unit Tests:', function () {
});
it('should not index missing email field, thus not enforce the model\'s unique index', function (done) {
var _user1 = new User(user1);
_user1.email = undefined;
var _user3 = new User(user3);
_user3.email = undefined;
_user1.save(function (err) {
should.not.exist(err);
_user3.save(function (err) {
should.not.exist(err);
_user3.remove(function (err) {
should.not.exist(err);
_user1.remove(function (err) {
should.not.exist(err);
done();
});
});
});
});
});
//it('should not index missing email field, thus not enforce the model\'s unique index', function (done) {
// var _user1 = new User(user1);
// _user1.email = undefined;
//
// var _user3 = new User(user3);
// _user3.email = undefined;
//
// _user1.save(function (err) {
// should.not.exist(err);
// _user3.save(function (err) {
// should.not.exist(err);
// _user3.remove(function (err) {
// should.not.exist(err);
// _user1.remove(function (err) {
// should.not.exist(err);
// done();
// });
// });
// });
// });
//
//});
it('should not save the password in plain text', function (done) {
var _user1 = new User(user1);