fix: close receipt delivery workflows
This commit is contained in:
@@ -455,6 +455,37 @@ describe('SmsConfigService', () => {
|
||||
}));
|
||||
});
|
||||
|
||||
it('derives both downstream delivery modes when CMPP is enabled alongside HTTP', async () => {
|
||||
const prisma = createPrismaMock();
|
||||
prisma.smsApplication.findUnique.mockResolvedValue({
|
||||
id: 'app-1',
|
||||
tenantId: 'tenant-1',
|
||||
cmppAccount: '100001',
|
||||
interfaceEnabled: false,
|
||||
httpConfig: { enabled: true },
|
||||
});
|
||||
const tx = {
|
||||
smsApplication: {
|
||||
update: jest.fn().mockResolvedValue({ id: 'app-1', interfaceEnabled: true }),
|
||||
},
|
||||
smsApplicationHttpConfig: {
|
||||
update: jest.fn().mockResolvedValue({}),
|
||||
},
|
||||
};
|
||||
prisma.$transaction.mockImplementationOnce((callback: (client: typeof tx) => unknown) => callback(tx));
|
||||
const service = new SmsConfigService(prisma as never);
|
||||
|
||||
await service.updateApplication('app-1', { interfaceEnabled: true });
|
||||
|
||||
expect(tx.smsApplicationHttpConfig.update).toHaveBeenCalledWith({
|
||||
where: { applicationId: 'app-1' },
|
||||
data: {
|
||||
receiptDeliveryMode: 'both',
|
||||
uplinkDeliveryMode: 'both',
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it('replaces application carrier channel-group routes with carrier validation', async () => {
|
||||
const prisma = createPrismaMock();
|
||||
const tx = {
|
||||
|
||||
Reference in New Issue
Block a user