mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
fix(chat): validate group membership, by @phillipthelen
This commit is contained in:
@@ -108,6 +108,20 @@ describe('PUT /user/auth/update-email', () => {
|
||||
const isValidPassword = await bcryptCompare(textPassword, user.auth.local.hashed_password);
|
||||
expect(isValidPassword).to.equal(true);
|
||||
});
|
||||
|
||||
it('invalidates any outstanding password reset code', async () => {
|
||||
await user.updateOne({
|
||||
'auth.local.passwordResetCode': 'impossible-reset-code',
|
||||
});
|
||||
|
||||
await user.put(ENDPOINT, {
|
||||
newEmail: 'bogo@example.com',
|
||||
password: oldPassword,
|
||||
});
|
||||
|
||||
await user.sync();
|
||||
expect(user.auth.local.passwordResetCode).to.not.exist;
|
||||
});
|
||||
});
|
||||
|
||||
context('Social Login User', async () => {
|
||||
|
||||
Reference in New Issue
Block a user