diff --git a/__tests__/findUserPdl.spec.js b/__tests__/findUserPdl.spec.js index aebbf6e81dd486de498babacb61022a95350afa6..02f233b6892923370646a0b33043576dc1fb5242 100644 --- a/__tests__/findUserPdl.spec.js +++ b/__tests__/findUserPdl.spec.js @@ -26,15 +26,7 @@ describe('recherchePoint', () => { }) try { - await findUserPdl( - 'azertyuiop', - 'apiKey', - 'login@user.com', - 'John', - '1 street', - '69069', - '69069' - ) + await findUserPdl() expect(true).toBe(false) } catch (error) { expect(error).toBe(errors.LOGIN_FAILED) @@ -44,15 +36,7 @@ describe('recherchePoint', () => { it('should throw LOGIN_FAIL if soapRequest fails', async () => { mockSoapRequest.mockRejectedValueOnce('reject') try { - await findUserPdl( - 'azertyuiop', - 'apiKey', - 'login@user.com', - 'John', - '1 street', - '69069', - '69069' - ) + await findUserPdl() expect(true).toBe(false) } catch (error) { expect(error).toBe(errors.LOGIN_FAILED) @@ -62,16 +46,6 @@ describe('recherchePoint', () => { it('should return a correct pdl number', async () => { mockParseUserPdl.mockResolvedValue('12345') mockSoapRequest.mockResolvedValue(responseMock) - expect( - await findUserPdl( - 'azertyuiop', - 'apiKey', - 'login@user.com', - 'John', - '1 street', - '69069', - '69069' - ) - ).toBe('12345') + expect(await findUserPdl()).toBe('12345') }) })