Fix update system schema

This commit is contained in:
Marco129
2016-03-04 03:06:53 +08:00
parent b301ea9a9c
commit 50735c4cbb
2 changed files with 24 additions and 0 deletions

View File

@@ -655,4 +655,21 @@ describe('Schema', () => {
});
done();
});
it('ignore default field when merge with system class', done => {
expect(Schema.buildMergedSchemaObject({
_id: '_User',
username: 'string',
password: 'string',
authData: 'object',
email: 'string',
emailVerified: 'boolean'
},{
authData: {type: 'string'},
customField: {type: 'string'},
})).toEqual({
customField: {type: 'string'}
});
done();
});
});