From 19e389f966ac79e0c02f55696dd1e5beedd00ea8 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Sun, 22 Feb 2026 11:43:42 -0500 Subject: [PATCH] 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. --- cmd/server/tests/user_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/server/tests/user_test.go b/cmd/server/tests/user_test.go index cd8112a..00e1483 100644 --- a/cmd/server/tests/user_test.go +++ b/cmd/server/tests/user_test.go @@ -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))