diff --git a/src/transaction/transaction.controller.spec.ts b/src/transaction/transaction.controller.spec.ts index 3fb3aa1..91a424a 100644 --- a/src/transaction/transaction.controller.spec.ts +++ b/src/transaction/transaction.controller.spec.ts @@ -173,4 +173,17 @@ describe('TransactionController Unit Tests', () => { 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"}'); + }); });