Skip to content

Test payment_received event topics and data fields #579

Description

@Kingsman-99

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

  • Add a test named payment_received_event_has_correct_fields in tests/event_log_tests.rs or a new file
  • Call payment_received(&env, 42, &payer, 1000) and capture published events
  • Assert topics include invoice_id == 42, data includes payer address and amount == 1000
  • cargo test passes

Context

  • Target file: contracts/split/src/events.rs (test in tests/event_log_tests.rs)
  • Use soroban_sdk::testutils::Events

Activity

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

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programcomplexity: highComplex feature requiring deep knowledge - 200 ptstestingTests — unit, integration, fuzz

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions