Description
record_invoice_created in contracts/split/src/stats.rs increments a persistent counter. There is no focused unit test checking that a single call advances the counter from 0 to 1 and emits a StatsUpdated event. This test would catch accidental no-ops or double-increment bugs.
Acceptance Criteria
Context
- Target file:
contracts/split/src/stats.rs
- Use
soroban_sdk::testutils::Env with allow_non_root_auth
Description
record_invoice_createdincontracts/split/src/stats.rsincrements a persistent counter. There is no focused unit test checking that a single call advances the counter from 0 to 1 and emits aStatsUpdatedevent. This test would catch accidental no-ops or double-increment bugs.Acceptance Criteria
record_invoice_created_increments_counterincontracts/split/src/stats.rsget_statsbefore and afterrecord_invoice_created0to1; volume and recipients_paid unchangedcargo testpassesContext
contracts/split/src/stats.rssoroban_sdk::testutils::Envwithallow_non_root_auth