From 622c332b78fadcdf16bf3898ada8d923ba2083ce Mon Sep 17 00:00:00 2001 From: meriamBenSassi Date: Wed, 6 Dec 2023 16:48:29 +0100 Subject: [PATCH] fix(hooks): remove wrong get User --- src/hooks/services/hooks.service.spec.ts | 2 -- src/hooks/services/hooks.service.ts | 1 - 2 files changed, 3 deletions(-) diff --git a/src/hooks/services/hooks.service.spec.ts b/src/hooks/services/hooks.service.spec.ts index b80b85a..e07dd2b 100644 --- a/src/hooks/services/hooks.service.spec.ts +++ b/src/hooks/services/hooks.service.spec.ts @@ -258,7 +258,6 @@ describe('HookService', () => { algoanCustomerService.getDefaultPassword(customerMock.id), Env.sandbox, ); - expect(getUserSpy).toHaveBeenCalledWith(`user-token-${process.pid}`, `id-${process.pid}`, Env.sandbox); // DO NOT get a linxo connect client token expect(geClientTokenSpy).not.toHaveBeenCalled(); @@ -388,7 +387,6 @@ describe('HookService', () => { getUserTokenSpy = jest .spyOn(linxoConnectAuthService, 'getUserToken') .mockResolvedValue(`user-token-${process.pid}`); - getUserSpy = jest.spyOn(linxoConnectUserService, 'getUser').mockResolvedValue(linxoConnectUserMock); deleteUserTokenSpy = jest.spyOn(linxoConnectUserService, 'deleteUser').mockResolvedValue(); getConnectionByIdSpy = jest .spyOn(linxoConnectConnectionService, 'getConnectionWithFinalStatus') diff --git a/src/hooks/services/hooks.service.ts b/src/hooks/services/hooks.service.ts index 65bf86a..fbb0755 100644 --- a/src/hooks/services/hooks.service.ts +++ b/src/hooks/services/hooks.service.ts @@ -86,7 +86,6 @@ export class HooksService { this.algoanCustomerService.getDefaultPassword(customer.id), env, ); - await this.linxoConnectUserService.getUser(userAccessToken, linxoConnectUserId, env); } catch (e) { // the user doesn't exist anymore userAccessToken = undefined;