Background
governance::cancel_proposal should not allow cancelling a proposal that has
already been executed (proposal.executed == true). The governance tests do not
cover this rejection path.
Goal
Add a test in tests/governance_tests.rs.
Tasks
- Create and execute a proposal (following the pattern in
- Attempt
cancel_proposal on the executed proposal.
- Assert an error is returned (check
src/governance.rs for the exact error —
- Also test
cancel_proposal on a pending proposal; assert success
Acceptance Criteria
- Executed proposals cannot be cancelled.
- Pending proposals can be cancelled.
Files
contracts/open-market/tests/governance_tests.rs.
Background
governance::cancel_proposalshould not allow cancelling a proposal that hasalready been executed (
proposal.executed == true). The governance tests do notcover this rejection path.
Goal
Add a test in
tests/governance_tests.rs.Tasks
cancel_proposalon the executed proposal.src/governance.rsfor the exact error —cancel_proposalon a pending proposal; assert successAcceptance Criteria
Files
contracts/open-market/tests/governance_tests.rs.