test that password is at least 8 characters

This commit is contained in:
woodser 2023-02-26 11:00:32 -05:00
parent 60fcda322e
commit 490f1e8c22

View File

@ -427,6 +427,14 @@ test("Can manage an account (CI)", async () => {
assert.equal(err.message, "Incorrect password"); assert.equal(err.message, "Incorrect password");
} }
// try setting password below minimum length
try {
await user3.changePassword(password, "abc123");
throw new Error("Should have failed setting password below minimum length")
} catch (err: any) {
assert.equal(err.message, "Password must be at least 8 characters");
}
// change password // change password
const newPassword = "newPassword"; const newPassword = "newPassword";
await user3.changePassword(password, newPassword); await user3.changePassword(password, newPassword);