Updated test for creating a duplicate user
This commit is contained in:
@ -20,8 +20,8 @@ describe('User Model', function() {
|
|||||||
password: 'password'
|
password: 'password'
|
||||||
});
|
});
|
||||||
user.save(function(err) {
|
user.save(function(err) {
|
||||||
if (err) return done();
|
if (err) err.code.should.equal(11000);
|
||||||
done('Created a user with duplicate email');
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user