From dabdf7eba256154e71ac5c8b2541c69ca32d16b3 Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Tue, 24 Jun 2025 14:55:37 +0300 Subject: [PATCH] add a test case to ensure the stored amount is not rounded off --- handlers/application/menuhandler_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/handlers/application/menuhandler_test.go b/handlers/application/menuhandler_test.go index e479f7b..a949e2c 100644 --- a/handlers/application/menuhandler_test.go +++ b/handlers/application/menuhandler_test.go @@ -1678,6 +1678,14 @@ func TestValidateAmount(t *testing.T) { Content: "0.02ms", }, }, + { + name: "Test with valid decimal amount", + input: []byte("0.149"), + activeBal: []byte("5"), + expectedResult: resource.Result{ + Content: "0.14", + }, + }, } for _, tt := range tests {