Fix issue #2134: creating an anonymous user (#2155)

* fix issue #2134

* username is returned only when generated

* fix unit tests

* incorporate @flovilmart review
This commit is contained in:
Hussam Moqhim
2016-06-27 06:19:37 +03:00
committed by Florent Vilmart
parent 2a4fbf7a15
commit a861c4e506
2 changed files with 6 additions and 0 deletions

View File

@@ -143,6 +143,7 @@ describe('rest create', () => {
expect(typeof r.response.objectId).toEqual('string');
expect(typeof r.response.createdAt).toEqual('string');
expect(typeof r.response.sessionToken).toEqual('string');
expect(typeof r.response.username).toEqual('string');
return rest.create(config, auth.nobody(config), '_User', data1);
}).then((r) => {
expect(typeof r.response.objectId).toEqual('string');