fix: local req missing url headers (#6126)

Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com>
This commit is contained in:
James Mikrut
2024-04-29 16:40:59 -04:00
committed by GitHub
parent b6631f4778
commit d8c3127b09
2 changed files with 23 additions and 1 deletions

View File

@@ -730,5 +730,25 @@ describe('Auth', () => {
expect(authenticated.token).toBeTruthy()
})
it('should forget and reset password', async () => {
const forgot = await payload.forgotPassword({
collection: 'users',
data: {
email: 'dev@payloadcms.com',
},
})
const reset = await payload.resetPassword({
collection: 'users',
overrideAccess: true,
data: {
password: 'test',
token: forgot,
},
})
expect(reset.user.email).toStrictEqual('dev@payloadcms.com')
})
})
})