Skip to content

Commit

Permalink
fix: wrong constant name used in test (#645)
Browse files Browse the repository at this point in the history
  • Loading branch information
harishv7 authored and alexanderleegs committed Mar 7, 2023
1 parent 496ceb6 commit eefb9d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/utilServices/__tests__/AuthService.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@ describe("Auth Service", () => {
const mockOtp = "123456"
it("should be able to verify otp, login, and return token if correct", async () => {
mockUsersService.verifyEmailOtp.mockImplementationOnce(() => true)
jwtUtils.signToken.mockImplementationOnce(() => signedToken)
jwtUtils.signToken.mockImplementationOnce(() => signedEmailToken)

await expect(
service.verifyOtp({ email: mockEmail, otp: mockOtp })
).resolves.toEqual(signedToken)
).resolves.toEqual(signedEmailToken)
expect(mockUsersService.verifyEmailOtp).toHaveBeenCalledWith(
mockEmail,
mockOtp
Expand Down

0 comments on commit eefb9d0

Please sign in to comment.