diff --git a/frontend/src/pages/ResetPassword.spec.js b/frontend/src/pages/ResetPassword.spec.js index f5d672c99..8f2d63791 100644 --- a/frontend/src/pages/ResetPassword.spec.js +++ b/frontend/src/pages/ResetPassword.spec.js @@ -149,13 +149,17 @@ describe('ResetPassword', () => { describe('server response with error code > 10min', () => { beforeEach(async () => { jest.clearAllMocks() - apolloMutationMock.mockRejectedValue({ message: '...Code is older than 10 minutes' }) + apolloMutationMock.mockRejectedValue({ + message: '...email was sent more than 23 hours and 10 minutes ago', + }) await wrapper.find('form').trigger('submit') await flushPromises() }) it('toasts an error message', () => { - expect(toastErrorSpy).toHaveBeenCalledWith('...Code is older than 10 minutes') + expect(toastErrorSpy).toHaveBeenCalledWith( + '...email was sent more than 23 hours and 10 minutes ago', + ) }) it('router pushes to /forgot-password/resetPassword', () => { diff --git a/frontend/src/pages/ResetPassword.vue b/frontend/src/pages/ResetPassword.vue index bf8664cef..02773e5e4 100644 --- a/frontend/src/pages/ResetPassword.vue +++ b/frontend/src/pages/ResetPassword.vue @@ -106,7 +106,7 @@ export default { this.toastError(error.message) if ( error.message.match( - /email was sent more than ([0-9]+ hours)?( and)?([0-9]+ minutes)? ago/, + /email was sent more than ([0-9]+ hours)?( and )?([0-9]+ minutes)? ago/, ) ) this.$router.push('/forgot-password/resetPassword')