MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / TestBalance_AddCredit

Function TestBalance_AddCredit

model/model_test.go:55–65  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

53}
54
55func TestBalance_AddCredit(t *testing.T) {
56 balance := &Balance{
57 CreditBalance: big.NewInt(0),
58 }
59 amount := new(big.Int)
60 amount.SetString("922337203685477580800", 10)
61 balance.addCredit(amount, false)
62 expected := new(big.Int)
63 expected.SetString("922337203685477580800", 10)
64 assert.Equal(t, expected, balance.CreditBalance)
65}
66
67func TestBalance_AddDebit(t *testing.T) {
68 balance := &Balance{

Callers

nothing calls this directly

Calls 1

addCreditMethod · 0.95

Tested by

no test coverage detected