add a test case to ensure the stored amount is not rounded off

This commit is contained in:
Alfred Kamanda 2025-06-24 14:55:37 +03:00
parent 96f6ca7d08
commit dabdf7eba2
Signed by: Alfred-mk
GPG Key ID: 7EA3D01708908703

View File

@ -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 {