fix: on password reset, delete all refresh tokens

This commit is contained in:
Divlo
2022-08-29 16:32:24 +00:00
parent a6dd112e4a
commit b71da7dcc9
2 changed files with 11 additions and 1 deletions

View File

@ -25,6 +25,11 @@ await tap.test('PUT /users/reset-password', async (t) => {
return userExample
}
})
sinon.stub(prisma, 'refreshToken').value({
deleteMany: async () => {
return { count: 1 }
}
})
const response = await application.inject({
method: 'PUT',
url: '/users/reset-password',