Description
Add unit tests for the event creation by club functionality using JUnit 5 and Mockito. The current implementation lacks sufficient test coverage, which may lead to issues in validation, authorization, and event-club linkage.
Tasks
- Set up test configuration for JUnit 5
- Mock dependencies using Mockito
- Write unit tests for event creation API/controller
- Test valid event creation scenarios
- Test invalid inputs (missing fields, invalid dates, etc.)
- Verify event is linked to a valid club
- Verify authorization (only club admins can create events)
- Test error handling and edge cases
- Ensure good test coverage
Description
Add unit tests for the event creation by club functionality using JUnit 5 and Mockito. The current implementation lacks sufficient test coverage, which may lead to issues in validation, authorization, and event-club linkage.
Tasks