Description
Add unit tests covering charge() failure scenarios that are not yet tested, so regressions in error handling are caught automatically instead of relying on manual testing.
Requirements and Context
- The happy path (create_plan -> approve -> subscribe -> charge) is already verified end-to-end on testnet
- Failure paths are currently untested and need explicit coverage
- Tests must use the existing test env setup, mock auth, and token contract setup patterns already present in the test module
- allowance expiration_ledger is capped at 3,000,000 ledgers - useful for constructing the expired allowance test case
Suggested Execution
Branch name: test/charge-failure-paths
Files to touch:
- src/test.rs (or wherever the existing test module lives - add new test functions)
Example commit message: test(core): add unit tests for charge failure paths
Test and Commit
Guidelines
Complexity
Trivial - 100 points
Description
Add unit tests covering charge() failure scenarios that are not yet tested, so regressions in error handling are caught automatically instead of relying on manual testing.
Requirements and Context
Suggested Execution
Branch name: test/charge-failure-paths
Files to touch:
Example commit message: test(core): add unit tests for charge failure paths
Test and Commit
Guidelines
Complexity
Trivial - 100 points