Skip to content

tests(pool): no test for handle_default on unknown invoice #443

Description

@K1NGD4VID

Summary

The pool's handle_default function at contracts/pool/src/lib.rs:687-744 returns false when no FundedInvoice entry exists. This early-return path has no test coverage.

Current Behavior

Lines 696-698:

if !env.storage().persistent().has(&funded_key) {
    return false;
}

The test suite has no test that calls handle_default with an unknown invoice ID.

Expected Behavior

Add a test that calls pool.handle_default with an invoice ID that was never funded.

Acceptance Criteria

  • Test: handle_default returns false for unfunded invoice
  • Test: pool state unchanged

Tech Stack

contracts/pool/src/test.rs

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions