Merge branch 'kneth/bugfix/invalid-token' of github.com:realm/realm-js into kneth/bugfix/invalid-token
This commit is contained in:
commit
7e85220e47
|
@ -209,7 +209,7 @@ class User {
|
||||||
* @param {string} adminToken - existing admin token
|
* @param {string} adminToken - existing admin token
|
||||||
* @param {string} server - authentication server
|
* @param {string} server - authentication server
|
||||||
* @return {User} - admin user populated with the given token and server
|
* @return {User} - admin user populated with the given token and server
|
||||||
* @throws {Error} If admin token or server is invalid.
|
* @throws {Error} If adminToken or server is invalid.
|
||||||
*/
|
*/
|
||||||
static adminUser(adminToken, server) {}
|
static adminUser(adminToken, server) {}
|
||||||
|
|
||||||
|
|
|
@ -197,7 +197,7 @@ const staticMethods = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isEmpty) {
|
if (isEmpty) {
|
||||||
throw new Error('Invalid admin token or server.');
|
throw new Error('Invalid adminToken or server.');
|
||||||
}
|
}
|
||||||
return user;
|
return user;
|
||||||
},
|
},
|
||||||
|
|
|
@ -384,7 +384,7 @@ module.exports = {
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
didThrow = true;
|
didThrow = true;
|
||||||
TestCase.assertTrue(e.message === 'Invalid admin token or server.');
|
TestCase.assertTrue(e.message === 'Invalid adminToken or server.');
|
||||||
}
|
}
|
||||||
TestCase.assertTrue(didThrow);
|
TestCase.assertTrue(didThrow);
|
||||||
|
|
||||||
|
@ -395,7 +395,7 @@ module.exports = {
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
didThrow = true;
|
didThrow = true;
|
||||||
TestCase.assertTrue(e.message === 'Invalid admin token or server.');
|
TestCase.assertTrue(e.message === 'Invalid adminToken or server.');
|
||||||
}
|
}
|
||||||
TestCase.assertTrue(didThrow);
|
TestCase.assertTrue(didThrow);
|
||||||
resolve();
|
resolve();
|
||||||
|
|
Loading…
Reference in New Issue