test: fix password mismatch test to use valid complex passwords

The test was using simple passwords ('password1', 'password2') that
failed complexity validation before the mismatch check could run.

Changed to use valid complex passwords that don't match:
- new_password: 'NewPassword123!'
- confirm_password: 'DifferentPass123!'

This properly tests the mismatch validation path. All 4 subtests in
TestUpdatePasswordAdminMode now pass.
This commit is contained in:
john-okeefe committed 2026-02-22 11:43:42 -05:00
1 parent 4cee9966c3
commit 19e389f966
1 file changed
+2 -2
+2 -2
View File
@@ -361,8 +361,8 @@ func TestUpdatePasswordAdminMode(t *testing.T) {
targetUser := createRegularUserOnce(t, setup.DB)
jsonData, _ := json.Marshal(map[string]interface{}{
"new_password": "password1",
"confirm_password": "password2",
"new_password": "NewPassword123!",
"confirm_password": "DifferentPass123!",
})
req := httptest.NewRequest("PUT", "/api/auth/password/"+targetUser.ID.String(), bytes.NewBuffer(jsonData))