Moved assertion of code 11000 inside if (err)

This commit is contained in:
Sahat Yalkabov
2014-02-26 02:46:21 -05:00
parent 232f91bf37
commit c8535fe4a1

View File

@ -34,7 +34,9 @@ describe('User attributes', function() {
it('should not allow users with duplicate emails', function(done) {
user.save(function(err) {
if (err) {
err.code.should.equal(11000);
}
done();
});
});