Commit Graph
1 Commits
Author SHA1 Message Date
toanhoang 10a8b0411d test: add Employee API tests
Mirrors tests/requests.test.ts's structure and @/auth mocking
pattern. Covers: successful create (with and without managerId),
empty name/department validation failures, malformed managerId UUID,
nonexistent managerId (FK violation -> friendly 400, not a raw 500),
a self-referential manager sanity check via direct Prisma update,
list ordering, empty list, and 401-when-unauthenticated for both
routes.
2026-07-31 14:57:37 +07:00