Skip to content

Add unit tests for pause_stream and resume_stream #330

@ogazboiz

Description

@ogazboiz

Join our community: https://t.me/+DOylgFv1jyJlNzM0

Description

pause_stream and resume_stream are implemented but have no tests. Bugs here silently over or under-pay recipients by miscalculating paused time.

Test Cases Needed

  • test_pause_stops_claimable_accrual
  • test_resume_extends_end_time_by_pause_duration
  • test_pause_by_non_sender_fails
  • test_resume_by_non_sender_fails
  • test_cannot_pause_already_paused_stream
  • test_cannot_resume_active_stream
  • test_cannot_pause_completed_stream
  • test_withdraw_while_paused_claims_only_pre_pause_accrual

Files

  • contracts/stream_contract/src/test.rs

Acceptance Criteria

  • All 8 tests pass
  • cargo test clean

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programsmart-contractSoroban smart contracttestingTesting related tasks

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions