34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
// import { PaymentWorkflow } from '../../src/orchestration/workflows/payment-workflow';
|
|
import { PaymentRequest } from '../../src/gateway/validation/payment-validation';
|
|
import { PaymentType, Currency } from '../../src/models/payment';
|
|
|
|
describe('PaymentWorkflow', () => {
|
|
// TODO: Update to use dependency injection after PaymentWorkflow refactoring
|
|
// let workflow: PaymentWorkflow;
|
|
|
|
// beforeEach(() => {
|
|
// workflow = new PaymentWorkflow();
|
|
// });
|
|
|
|
describe('initiatePayment', () => {
|
|
it('should create a payment with PENDING_APPROVAL status', async () => {
|
|
const paymentRequest: PaymentRequest = {
|
|
type: PaymentType.CUSTOMER_CREDIT_TRANSFER,
|
|
amount: 1000,
|
|
currency: Currency.USD,
|
|
senderAccount: 'ACC001',
|
|
senderBIC: 'TESTBIC1',
|
|
receiverAccount: 'ACC002',
|
|
receiverBIC: 'TESTBIC2',
|
|
beneficiaryName: 'Test Beneficiary',
|
|
};
|
|
|
|
// Mock implementation would be tested here
|
|
// This is a placeholder for actual test implementation
|
|
expect(paymentRequest.type).toBe(PaymentType.CUSTOMER_CREDIT_TRANSFER);
|
|
});
|
|
});
|
|
|
|
// Add more tests as needed
|
|
});
|