diff --git a/tests/unit/utils.responseBuilder.test.js b/tests/unit/utils.responseBuilder.test.js index 526d3b0..8029e95 100644 --- a/tests/unit/utils.responseBuilder.test.js +++ b/tests/unit/utils.responseBuilder.test.js @@ -46,7 +46,7 @@ describe('Response Builder', () => { const status = 400; const details = { field: 'test' }; - R.error(res, code, message, status, details); + R.error(res, { code, message, status, details }); expect(res.status).toHaveBeenCalledWith(status); expect(res.json).toHaveBeenCalledWith({ @@ -59,7 +59,7 @@ describe('Response Builder', () => { }); it('should send error response without details', () => { - R.error(res, 'ERROR', 'Message', 500); + R.error(res, { code: 'ERROR', message: 'Message', status: 500 }); expect(res.json).toHaveBeenCalledWith({ success: false, data: null,