Commit dde7963
committed
feat(tests): add SQL mock tests for report repository CRUD operations
- Introduced comprehensive unit tests for the PostgresReportRepository, covering Create, Delete, Update, and List functionalities.
- Utilized sqlmock to simulate database interactions and validate repository behavior under various scenarios.
- Enhanced error handling tests to ensure proper responses for different execution outcomes, including database errors and validation issues.
- Updated the repository methods to use constant queries for improved readability and maintainability.1 parent a997740 commit dde7963
5 files changed
Lines changed: 811 additions & 68 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| |||
0 commit comments