fix: local req missing url headers (#6126)
Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com>
This commit is contained in:
@@ -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')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user