Skip to content

forge-vesting — add test verifying initialize() with total_amount = 0 returns InvalidConfig #311

@Austinaminu2

Description

@Austinaminu2

Summary

initialize() validates total_amount <= 0 but the existing test_invalid_config_rejected only tests cliff > duration. There is no test explicitly covering the total_amount = 0 and total_amount = -1 cases which are the other two InvalidConfig branches.

Tasks

  • Test initialize() with total_amount = 0 — assert Err(VestingError::InvalidConfig)
  • Test initialize() with total_amount = -1 — assert Err(VestingError::InvalidConfig)
  • Test initialize() with duration_seconds = 0 — assert Err(VestingError::InvalidConfig)
  • Verify no config is stored after any of these failed calls
  • Verify a subsequent valid initialize() succeeds after the failed attempts

Labels: testing, forge-vesting

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave program

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions