codersforcauses / codersforcauses/bloom-booking-system
Create Comprehensive Tests for Booking App
- Dominant language
- TypeScript
- Stars
- 4
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
1. Test Booking Creation (POST):
- [x] Verify successful creation and the time conflict validation fails if another booking exists in the requested time slot for the same room.
- [x] Test successful creation when recurrence_rule is present (optional validation).
2: Test Admin Retrieval (GET /api/bookings):
- [x] Test access control (only Admin succeeds).
- [x] Test all filtering options (room_id, date, visitor_name, visitor_email).
3: Test Visitor Search (GET /api/bookings/search):
- [x] Test successful search only when visitor_email is provided.
- [x] Test that no other filters are allowed.
4: Test Update (PUT /api/bookings/{id}):
- [x] Test successful reschedule (time update).
- [x] Verify time conflict validation is checked upon update.
5: Test Deletion (DELETE /api/bookings/{id}):
- [x] Verify the status changes to CANCELLED and the cancel_reason is recorded.
- [x] Verify only the user with the matching visitor_email can cancel (optional security check).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.