feat: added one integration test (closes #19) #20

Merged
inga-lovinde merged 1 commits from feat-19-add-integration-test into main 10 months ago
  1. 13
      src/transaction/transaction.controller.spec.ts

@ -173,4 +173,17 @@ describe('TransactionController Unit Tests', () => {
expect(result).to.eql('{"amount":"4.17","currency":"EUR"}'); expect(result).to.eql('{"amount":"4.17","currency":"EUR"}');
}); });
it('returns correct amount for small transactions', async () => {
const mockTransactionInput: TransactionInput = {
date: '2021-01-05',
amount: '0.01',
currency: 'EUR',
client_id: 1,
};
const result = await transactionController.commission(mockTransactionInput);
expect(result).to.eql('{"amount":"0.05","currency":"EUR"}');
});
}); });

Loading…
Cancel
Save