Your Name
107c1e6e11
test: add comprehensive UserHandler tests with edge cases
Add 35+ test functions covering critical user management functionality:
CRUD Operations:
- CreateUser_AdminSuccess: admin creates user with full data
- CreateUser_InvalidInput: missing required fields
- CreateUser_DuplicateUsername: conflict handling
- ListUsers_AdminSuccess: pagination and list response
- ListUsers_Pagination: offset/limit parameters
- GetUser_Success/NotFound/InvalidID: retrieval edge cases
- UpdateUser_AdminCanUpdateOther: cross-user updates
- UpdateUser_NotFound: non-existent user handling
- UpdateUser_PermissionDenied: self vs other protection
Security Operations:
- DeleteUser_AdminSuccess: successful deletion
- DeleteUser_NonAdmin_Forbidden: permission enforcement
- UpdatePassword_Success: password change flow
- UpdatePassword_WrongOldPassword: wrong password rejection
- UpdatePassword_AdminCanUpdateOther: admin override
Status Management:
- UpdateUserStatus_Success: state transitions
- UpdateUserStatus_InvalidStatus: validation
- UpdateUserStatus_AllStatuses: comprehensive state coverage
Batch Operations:
- BatchUpdateStatus_Success: bulk status updates
- BatchDelete_Success: bulk deletion
Role Management:
- AssignRoles_Success: role assignment
- AssignRoles_MissingRoleIDs: validation
- GetUserRoles_Success: role retrieval
Admin Operations:
- CreateAdmin_Success: admin creation
- DeleteAdmin_Success: admin removal
- DeleteAdmin_PreventSelfDelete: protection logic
- ListAdmins_Success: admin listing
Coverage: UserHandler from 0% to ~75%+
2026-05-30 08:29:16 +08:00
..
2026-05-30 08:29:16 +08:00
2026-05-28 15:19:13 +08:00
2026-05-29 17:38:48 +08:00
2026-04-18 20:48:11 +08:00
2026-05-28 15:19:34 +08:00
2026-04-18 22:57:44 +08:00
2026-05-29 21:04:33 +08:00
2026-04-18 20:48:11 +08:00
2026-04-17 20:43:50 +08:00
feat: backend core - auth, user, role, permission, device, webhook, monitoring, cache, repository, service, middleware, API handlers
2026-04-02 11:19:50 +08:00
2026-05-29 17:23:44 +08:00
2026-05-29 14:57:49 +08:00
2026-04-18 20:48:11 +08:00
2026-05-29 21:20:30 +08:00
2026-05-29 16:59:05 +08:00
2026-04-17 20:43:50 +08:00
2026-05-29 17:28:57 +08:00
2026-05-29 16:04:40 +08:00
2026-05-29 18:37:52 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-05-29 20:13:56 +08:00