add(feat): verification
This commit is contained in:
@@ -18,6 +18,7 @@ const paylaterService = require('../../app/modules/paylater/services/paylater.se
|
||||
describe('PayLaterService', () => {
|
||||
beforeEach(() => {
|
||||
jest.clearAllMocks();
|
||||
process.env.PROJECT_ID = 'CBT';
|
||||
});
|
||||
|
||||
it('should create an akulaku transaction successfully', async () => {
|
||||
@@ -25,6 +26,9 @@ describe('PayLaterService', () => {
|
||||
mockCharge.mockResolvedValue({ status_code: '201' });
|
||||
await paylaterService.createTransaction(payload, 'akulaku');
|
||||
expect(mockCharge).toHaveBeenCalledWith(expect.objectContaining({
|
||||
transaction_details: expect.objectContaining({
|
||||
order_id: 'INV-AK-001-CBT'
|
||||
}),
|
||||
payment_type: 'akulaku'
|
||||
}));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user