Skip to content

test: cover wallet-balance and E.164 money paths#8

Open
rajarshidattapy wants to merge 1 commit into
bolna-ai:mainfrom
rajarshidattapy:test/money-paths-v2
Open

test: cover wallet-balance and E.164 money paths#8
rajarshidattapy wants to merge 1 commit into
bolna-ai:mainfrom
rajarshidattapy:test/money-paths-v2

Conversation

@rajarshidattapy

Copy link
Copy Markdown

What

Fixes #1

First tests for the money-adjacent paths in cli/ / tui/, which had zero coverage. A silent regression here costs real money (wrong wallet display before a billable call, or a malformed number dialed).

Path Test file Pins
UserInfo.Balance() internal/api/account_test.go /100 wallet scaling (the 22bc0ef bug), zero balance, wallet precedence over fallback fields, unscaled fallbacks, missing/wrong-type field, and the $%.2f confirmation-summary format
e164Pattern internal/tui/callstart_test.go recipient-number accept/reject boundary (min/max length, leading zero, spaces/dashes/parens, missing +) that gates a real outbound call

Stdlib testing only, table-driven to match the existing client_test.go. Both paths are pure functions — no network, no RPC mock needed. go test ./... passes.

Scope note

The issue's wording ("transfer amounts", "addresses", "RPC") is boilerplate from a different project. This repo is a Go voice-agent CLI with no fund transfers, RPC, or crypto addresses, so I mapped the intent onto its real money paths: wallet-balance display and the E.164 phone gate before a paid call. There is no amount-input path to test.

Not included (as scoped)

  • TUI render/snapshot tests
  • Full command-surface coverage

Add once the money paths are locked down.

@rajarshidattapy

Copy link
Copy Markdown
Author

hey @tanisha-byte , whenever you are free, can you look through the 4 PRs, I've put?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Title: No test coverage for cli/ and tui/, including balance and transfer paths

1 participant