Apply iteration on the model object

This commit is contained in:
ssh24 2017-05-26 18:49:02 -04:00
parent 0a056adee4
commit e791e9006c
1 changed files with 2 additions and 4 deletions

View File

@ -180,13 +180,11 @@ describe('Model class inheritance', function() {
return k.indexOf('__') === -1;
}).length, 0);
var count = 0;
for (var p in customer) {
for (var p in customer.toObject()) {
if (p.indexOf('__') === 0) {
continue;
}
// Please note there is an injected id from User prototype which is a function
// On node >= 7, this property does not show up
if (typeof customer[p] !== 'function' && p !== 'id') {
if (typeof customer[p] !== 'function') {
count++;
}
}