Fixing a typo in _getExistingUser (#1634)
This commit is contained in:
parent
7569816526
commit
ac82bd285d
14
CHANGELOG.md
14
CHANGELOG.md
|
@ -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
|
||||
|
|
|
@ -36,7 +36,7 @@ export default class User {
|
|||
return getAllUsersRPC();
|
||||
}
|
||||
|
||||
static _getExistinguser() {
|
||||
static _getExistingUser() {
|
||||
return _getExistingUserRPC();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -196,9 +196,9 @@ module.exports = {
|
|||
testAuthenticateJWT() {
|
||||
let token = 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJhdXN0aW5femhlbmciLCJpc0FkbWluIjp0cnVlLCJpYXQiOjE1MTI2OTI3NDl9.klca-3wYLe5mGdVk7N7dE9YRIlB1el1Dv6BxZNAKMsJ3Ms4vBTweu4-65kVJftiMrYhmSGY6QtTzqQ-xlLH4XzPd3jYIXlPQ45lxO7PW7EkJNs9m83VdcsJmHRHQ3PRP8V_mx0f2Ks4ga3xZ9IycAQB4q5NXLei_HJk8tRRJccZ6qB5nnAoD48Qu8JOEfhO596Mdoi-QCbH51iJZjgXo4gSRZ4KKK8jU0S6twLj_lf9jehENTqHDdtsRHdyCnICcPcz4AjFrNHEvUrsPkGxXSZ2BCGgDcvsSTVgGNV7rWU4IjH4FaDssenumi50R1QcZh8kiO35s9H6MngQsEm-zApRgd0V9_L3A6Ys47_crmKbunYRsATfMNBn2fKm5tS6RXvM2RN2G_Y9AkGgh2boY42CRy7HOcHby2vQ8IoQ-fZfE5xn_YYktNlKeNiCv3_-i86lANFbmB3tcdScrbjsgO6Tfg3u71VmJ_ZW1_vyMi5vCTEysLXfHG-OA85c3o8-25vcfuX5gIpbU-nMLgPagyn5w7Uazd27uhFfwepP9OMc8jz2JTlQICInLCUdESu8aG5d1F_IPUA5NU_ryPmebqUmyaRVDS8cGChxp0gZDNSiIvaggw8N2JCDGvk-s_PSG2pFGq0f4veYyWGBTHD_iX4a0UrhB471QZplRpMwvu7o'
|
||||
return Realm.Sync.User.authenticate('http://localhost:9080', 'jwt', { token: token })
|
||||
.then((user) => {
|
||||
.then((user) => {
|
||||
TestCase.assertEqual(user.identity, 'austin_zheng')
|
||||
Promise.resolve()
|
||||
Promise.resolve()
|
||||
})
|
||||
.catch((e) => { Promise.reject(e) } )
|
||||
},
|
||||
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue