Fix the null/undefined check

This commit is contained in:
Raymond Feng 2015-02-20 09:55:09 -08:00
parent 02503e7635
commit a713f25d61
1 changed files with 5 additions and 3 deletions

View File

@ -206,11 +206,13 @@ describe('manipulation', function () {
Person.findById(created.id, function(err, found) {
if (err) return done(err);
found.toObject().should.have.properties({
var result = found.toObject();
result.should.have.properties({
id: created.id,
name: 'a-name',
gender: undefined
name: 'a-name'
});
// The gender can be null from a RDB
should.equal(result.gender, null);
done();
});
});