Fixing a typo in _getExistingUser (#1634)

This commit is contained in:
Kenneth Geisshirt 2018-01-24 08:07:19 +01:00 committed by GitHub
parent 7569816526
commit ac82bd285d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 3 deletions

View File

@ -1,3 +1,17 @@
X.Y.Z Release notes
=============================================================
### Breaking changes
* None.
### Enhancements
* None.
### Bug fixes
* [Object Server] Fixed a typing error leading to `_getExistingUser` wasn't defined in the Chrome debugging support library (#1625).
### Internal
* None.
2.2.4 Release notes (2018-1-18)
=============================================================
### Breaking changes

View File

@ -36,7 +36,7 @@ export default class User {
return getAllUsersRPC();
}
static _getExistinguser() {
static _getExistingUser() {
return _getExistingUserRPC();
}
}

View File

@ -253,6 +253,18 @@ module.exports = {
});
},
testGetExistingUser() {
let userid = uuid();
return Realm.Sync.User.register('http://localhost:9080', userid, 'password').then((user) => {
let identity = user.identity;
let user1 = Realm.Sync.User._getExistingUser('http://localhost:9080', identity);
assertIsSameUser(user1, user);
user.logout();
let user2 = Realm.Sync.User._getExistingUser('http://localhost:9080', identity);
TestCase.assertUndefined(user2);
});
},
testManagementRealm() {
return Realm.Sync.User.register('http://localhost:9080', uuid(), 'password').then((user) => {
let realm = user.openManagementRealm();