Run Schema validations after beforeSave #2672 (#2677)

* Adds test to repro #2672

* Run schema validation after beforeSave is run

* Makes authData part of base _User object

* exclude flaky pg test
This commit is contained in:
Florent Vilmart
2016-09-09 14:41:03 -04:00
committed by GitHub
parent 58a2ee32fa
commit 364604e181
5 changed files with 48 additions and 5 deletions

View File

@@ -96,7 +96,8 @@ const userSchema = {
"username": {"type": "String"},
"password": {"type": "String"},
"email": {"type": "String"},
"emailVerified": {"type": "Boolean"}
"emailVerified": {"type": "Boolean"},
"authData": {"type": "Object"}
},
"classLevelPermissions": defaultClassLevelPermissions,
}
@@ -676,6 +677,7 @@ describe('schemas', () => {
password: {type: 'String'},
email: {type: 'String'},
emailVerified: {type: 'Boolean'},
authData: {type: 'Object'},
newField: {type: 'String'},
ACL: {type: 'ACL'}
},
@@ -696,6 +698,7 @@ describe('schemas', () => {
password: {type: 'String'},
email: {type: 'String'},
emailVerified: {type: 'Boolean'},
authData: {type: 'Object'},
newField: {type: 'String'},
ACL: {type: 'ACL'}
},