Description
payment_received in contracts/split/src/events.rs publishes an event with topics (split, paid, invoice_id) and data (payer, amount, event_seq). There is no test asserting that the event is published with the correct field values after a call to this function.
Acceptance Criteria
Context
- Target file:
contracts/split/src/events.rs (test in tests/event_log_tests.rs)
- Use
soroban_sdk::testutils::Events
Description
payment_receivedincontracts/split/src/events.rspublishes an event with topics(split, paid, invoice_id)and data(payer, amount, event_seq). There is no test asserting that the event is published with the correct field values after a call to this function.Acceptance Criteria
payment_received_event_has_correct_fieldsintests/event_log_tests.rsor a new filepayment_received(&env, 42, &payer, 1000)and capture published eventsinvoice_id == 42, data includespayeraddress andamount == 1000cargo testpassesContext
contracts/split/src/events.rs(test intests/event_log_tests.rs)soroban_sdk::testutils::Events