diff --git a/src/management/index.js b/src/management/index.js index 1d80c2355..3c756aba3 100644 --- a/src/management/index.js +++ b/src/management/index.js @@ -231,7 +231,7 @@ class ManagementClient { * Simple abstraction for performing CRUD operations on the * blacklisted tokens endpoint. * - * @type {BlacklistedtokensManager} + * @type {BlacklistedTokensManager} */ this.blacklistedTokens = new BlacklistedTokensManager(managerOptions); @@ -328,7 +328,7 @@ class ManagementClient { * Simple abstraction for performing CRUD operations on the * branding endpoint. * - * @type {HooksManager} + * @type {BrandingManager} */ this.branding = new BrandingManager(managerOptions); @@ -1287,7 +1287,7 @@ class ManagementClient { * @returns {Promise|undefined} */ assignRolestoUser(...args) { - return this.roles.assignRoles(...args); + return this.users.assignRoles(...args); } /** diff --git a/test/management/management-client.tests.js b/test/management/management-client.tests.js index 619e91c23..78c4d89ae 100644 --- a/test/management/management-client.tests.js +++ b/test/management/management-client.tests.js @@ -933,5 +933,12 @@ describe('ManagementClient', () => { expect(this.client[method]).to.exist.to.be.an.instanceOf(Function); }); }); + + it('should assign roles to a user', function () { + sinon.stub(this.client.users, 'assignRoles'); + this.client.assignRolestoUser(); + expect(this.client.users.assignRoles.called).ok; + this.client.users.assignRoles.reset(); + }); }); });