Skip to content

Commit

Permalink
Fix wrong property in assignRolestoUser (#700)
Browse files Browse the repository at this point in the history
Co-authored-by: Frederik Prijck <[email protected]>
  • Loading branch information
adamjmcgrath and frederikprijck authored Jan 27, 2022
1 parent 8fe9ade commit 77dcee5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/management/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -1287,7 +1287,7 @@ class ManagementClient {
* @returns {Promise|undefined}
*/
assignRolestoUser(...args) {
return this.roles.assignRoles(...args);
return this.users.assignRoles(...args);
}

/**
Expand Down
7 changes: 7 additions & 0 deletions test/management/management-client.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
});
});

0 comments on commit 77dcee5

Please sign in to comment.