unit test fixes + error refactor
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 13m41s
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 13m41s
This commit is contained in:
@@ -214,7 +214,7 @@ describe('Admin DB Service', () => {
|
||||
|
||||
it('should throw an error if the comment is not found (rowCount is 0)', async () => {
|
||||
mockPoolInstance.query.mockResolvedValue({ rowCount: 0, rows: [] });
|
||||
await expect(adminRepo.updateRecipeCommentStatus(999, 'hidden')).rejects.toThrow('Failed to update recipe comment status.');
|
||||
await expect(adminRepo.updateRecipeCommentStatus(999, 'hidden')).rejects.toThrow('Recipe comment with ID 999 not found.');
|
||||
});
|
||||
|
||||
it('should throw a generic error if the database query fails', async () => {
|
||||
|
||||
Reference in New Issue
Block a user