-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -696,14 +696,14 @@ describe('/api/v1/users', () => { | |
}); | ||
}); | ||
|
||
describe('POST /request-password-reset', () => { | ||
describe('PATCH /request-password-reset', () => { | ||
it('should allow user to request a password reset', async (t) => { | ||
const app = await build(t); | ||
await t.loadFixtures(); | ||
|
||
const res = await app | ||
.inject() | ||
.post('/api/v1/users/request-password-reset') | ||
.patch('/api/v1/users/request-password-reset') | ||
.payload({ | ||
email: '[email protected]', | ||
}); | ||
|
@@ -729,7 +729,7 @@ describe('/api/v1/users', () => { | |
|
||
const res = await app | ||
.inject() | ||
.post('/api/v1/users/request-password-reset') | ||
.patch('/api/v1/users/request-password-reset') | ||
.payload({ | ||
email: '[email protected]', | ||
}); | ||
|
@@ -797,14 +797,14 @@ describe('/api/v1/users', () => { | |
}); | ||
}); | ||
|
||
describe('POST /password-reset', () => { | ||
describe('PATCH /password-reset', () => { | ||
it('should return status OK on successful password reset', async (t) => { | ||
const app = await build(t); | ||
await t.loadFixtures(); | ||
|
||
const res = await app | ||
.inject() | ||
.post('/api/v1/users/password-reset') | ||
.patch('/api/v1/users/password-reset') | ||
.payload({ | ||
passwordResetToken: '4ae4a190-005e-4222-aac3-7dd5ff2c477f', | ||
password: 'NewPassword123!', | ||
|
@@ -834,15 +834,15 @@ describe('/api/v1/users', () => { | |
|
||
let res = await app | ||
.inject() | ||
.post('/api/v1/users/password-reset') | ||
.patch('/api/v1/users/password-reset') | ||
.payload({ | ||
passwordResetToken: '4ae4a190-005e-4222-aac3-7dd5ff2c477f', | ||
password: 'NewPassword123!', | ||
}); | ||
|
||
assert.deepStrictEqual(res.statusCode, StatusCodes.OK); | ||
|
||
res = await app.inject().post('/api/v1/users/password-reset').payload({ | ||
res = await app.inject().patch('/api/v1/users/password-reset').payload({ | ||
passwordResetToken: '4ae4a190-005e-4222-aac3-7dd5ff2c477f', | ||
password: 'AnotherPassword123!', | ||
}); | ||
|