Skip to content

Commit

Permalink
test: authorization tests fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
dpopp07 committed Jun 10, 2019
1 parent 7adb4b2 commit bca5f40
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/unit/authorization.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ describe('authorization', function() {
expect(rc_authorization.tokenManager).not.toBeNull();

// mock the token manager request method
const requestMock = jest.spyOn(rc_authorization.tokenManager, 'requestToken');
requestMock.mockImplementation(cb => cb(null, { access_token: mock_token }));
const requestMock = jest.spyOn(rc_authorization.tokenManager, 'getToken');
requestMock.mockImplementation(cb => cb(null, mock_token));

rc_authorization.getToken(checkToken(done));
});
Expand Down
2 changes: 1 addition & 1 deletion test/unit/iam-token-manager.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ describe('iam token manager', () => {
it('should correctly export the token manager from the core module', () => {
const tokenManager = new TokenManagerV1({});
expect(tokenManager).toBeDefined();
expect(tokenManager.iamUrl).toBeDefined();
expect(tokenManager.url).toBeDefined();
expect(tokenManager.tokenInfo).toBeDefined();
expect(tokenManager.getToken).toBeInstanceOf(Function);
expect(tokenManager.setAccessToken).toBeInstanceOf(Function);
Expand Down

0 comments on commit bca5f40

Please sign in to comment.