Fix the null/undefined check
This commit is contained in:
parent
02503e7635
commit
a713f25d61
|
@ -206,11 +206,13 @@ describe('manipulation', function () {
|
||||||
|
|
||||||
Person.findById(created.id, function(err, found) {
|
Person.findById(created.id, function(err, found) {
|
||||||
if (err) return done(err);
|
if (err) return done(err);
|
||||||
found.toObject().should.have.properties({
|
var result = found.toObject();
|
||||||
|
result.should.have.properties({
|
||||||
id: created.id,
|
id: created.id,
|
||||||
name: 'a-name',
|
name: 'a-name'
|
||||||
gender: undefined
|
|
||||||
});
|
});
|
||||||
|
// The gender can be null from a RDB
|
||||||
|
should.equal(result.gender, null);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue