From 913d322494593d0366b8dbe2e0da26d8032624e0 Mon Sep 17 00:00:00 2001 From: Inga Date: Mon, 15 Jan 2024 22:17:20 +0000 Subject: [PATCH] feat: added one integration test (closes #19) --- src/transaction/transaction.controller.spec.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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"}'); + }); }); -- 2.30.2