From 77dcee576432de425f9183360bc90d977b9db52f Mon Sep 17 00:00:00 2001 From: Adam Mcgrath Date: Thu, 27 Jan 2022 07:13:13 -0400 Subject: [PATCH] Fix wrong property in assignRolestoUser (#700) Co-authored-by: Frederik Prijck --- src/management/index.js | 6 +++--- test/management/management-client.tests.js | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) 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(); + }); }); });