Skip to content

Conversation

@KothariMansi
Copy link

@KothariMansi KothariMansi commented Sep 28, 2025

This PR adds comprehensive unit tests for the Project API endpoints:

  1. GetAllProjects – verifies fetching all projects.
  2. CreateProject – verifies creating a new project and persistence in the database.
  3. GetProject – verifies fetching a single project by title, including the 404 case.
  4. UpdateProject – verifies updating a project title and persisting changes.
  5. DeleteProject – verifies deleting a project and confirming it is removed from the database.
  6. ArchiveProject – verifies archiving a project and persisting the Archived state.
  7. RestoreProject – verifies restoring an archived project and ensuring Archived is set to false.

All tests use an in-memory SQLite database and mux router to simulate API requests, ensuring fast and isolated unit testing without external dependencies.

This PR improves test coverage, reliability, and maintainability of the Project API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant