-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Write comprehensive server-side tests for new interview management endpoints (delete slot, add interviewees, get interviewees).
1. DELETE /api/interviews/slots/{slotId}
- Delete unbooked slot → 204 No Content
- Delete booked slot → 400 Bad Request (cannot delete booked)
- Delete slot from other professor → 403 Forbidden
- Delete non-existent slot → 404 Not Found
- Verify slot is actually removed from database
2. POST /api/interviews/processes/{processId}/interviewees
- Add valid applicants → 201 Created, returns IntervieweeDTOs
- Add applicants from different job → 400 Bad Request
- Add duplicate applicants → skip duplicates silently, no error
- Add as non-owner → 403 Forbidden
- Add to non-existent process → 404 Not Found
- Verify interviewees created in database
- Verify correct state ("UNCONTACTED" initially)
3. GET /api/interviews/processes/{processId}/interviewees
- Get all interviewees → returns full list
- Get as non-owner → 403 Forbidden
- Get from non-existent process → 404 Not Found
- Verify state calculation (based on lastInvited and slots)