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

Function TestBalance_CommitInflightCredit

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

Source from the content-addressed store, hash-verified

382}
383
384func TestBalance_CommitInflightCredit(t *testing.T) {
385 balance := &Balance{
386 InflightCreditBalance: big.NewInt(400),
387 CreditBalance: big.NewInt(100),
388 }
389 txn := &Transaction{
390 Amount: 300,
391 Precision: 1,
392 }
393 balance.CommitInflightCredit(txn)
394 assert.Equal(t, big.NewInt(100), balance.InflightCreditBalance)
395 assert.Equal(t, big.NewInt(400), balance.CreditBalance)
396}
397
398func TestBalance_RollbackInflightCredit(t *testing.T) {
399 balance := &Balance{

Callers

nothing calls this directly

Calls 1

CommitInflightCreditMethod · 0.95

Tested by

no test coverage detected