Apply iteration on the model object
This commit is contained in:
parent
0a056adee4
commit
e791e9006c
|
@ -180,13 +180,11 @@ describe('Model class inheritance', function() {
|
||||||
return k.indexOf('__') === -1;
|
return k.indexOf('__') === -1;
|
||||||
}).length, 0);
|
}).length, 0);
|
||||||
var count = 0;
|
var count = 0;
|
||||||
for (var p in customer) {
|
for (var p in customer.toObject()) {
|
||||||
if (p.indexOf('__') === 0) {
|
if (p.indexOf('__') === 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Please note there is an injected id from User prototype which is a function
|
if (typeof customer[p] !== 'function') {
|
||||||
// On node >= 7, this property does not show up
|
|
||||||
if (typeof customer[p] !== 'function' && p !== 'id') {
|
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue