Skip to content

[TESTING] Write Integration Test for Multi-Currency Escrow Settlement #170

Description

@chizzy192

[TESTING] Issue

Metadata

Field Value
Domain Testing
Difficulty Easy (2 Days)
Effort Estimate effort: 3h
Priority P2-Medium
Labels good first issue
Target Branch dev
Depends On None

🎯 Context & Goal

Comprehensive test coverage is mandatory for smart contract security.

This issue adds tests in contracts/invoice-escrow within integration_test.rs to validate behavior under edge cases and unexpected inputs.

Ensuring robust test coverage prevents regression bugs during contract upgrades.

📂 Target Files

  • contracts/invoice-escrow/src/integration_test.rstest_runner

📋 Implementation Tasks

  • Task 1: Write test functions in contracts/invoice-escrow/src/integration_test.rs.
  • Task 2: Assert proper error code emissions on failure paths.
  • Task 3: Verify state storage persistence after execution.
  • Task 4: Ensure all workspace tests pass with cargo test --all.

🛠️ Technical Guidance

#[test]
fn test_contract_scenario() {
    let env = Env::default();
    // Test logic here
}

🔗 References & Related

  • Test file: contracts/invoice-escrow/src/integration_test.rs

⏳ Delivery Window

This issue should be completed within 2 day(s) of assignment.

Contribution Workflow

  1. Branch off dev: git checkout -b feature/issue-implementation dev
  2. Implement all tasks in the checklist above.
  3. Run all CI checks locally (see DEVELOPMENT.md).
  4. Open a Pull Request targeting dev.
  5. Link this issue in your PR description.

✅ Acceptance Criteria

  • All implementation tasks above are completed cleanly.
  • Code compiles without warnings or errors.
  • All existing tests continue to pass.
  • New unit tests cover all modified code paths.
  • PR strictly targets the dev branch.
  • Code follows project style guidelines (cargo fmt and cargo clippy).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions