Skip to content

Add tests for OriginalPayload and PsbtContext#1583

Open
xstoicunicornx wants to merge 1 commit into
payjoin:masterfrom
xstoicunicornx:add-tests-core-receive
Open

Add tests for OriginalPayload and PsbtContext#1583
xstoicunicornx wants to merge 1 commit into
payjoin:masterfrom
xstoicunicornx:add-tests-core-receive

Conversation

@xstoicunicornx
Copy link
Copy Markdown
Collaborator

@xstoicunicornx xstoicunicornx commented May 27, 2026

Summary

Currently, the OriginalPayload's validation methods and PsbtContext's finalization method do not have explicit tests that exercise all possible errors that may arise when call. This PR creates tests that cover the success and error paths for each validation step in the receiver's OriginalPayload (broadcast suitability, input ownership, and input known validation) as well as PsbtContext's proposal finalization.

These tests were written in preparation of implementing PR 1446.

Claude AI was used to generate these tests.

Pull Request Checklist

Please confirm the following before requesting review:

Cover the success and error paths for each validation
step in the receiver's OriginalPayload's broadcast
suitability, input ownership, and input known validation 
as well as PsbtContext's proposal finalization.
@coveralls
Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 26541650378

Coverage increased (+0.1%) to 85.254%

Details

  • Coverage increased (+0.1%) from the base build.
  • Patch coverage: 8 uncovered changes across 1 file (112 of 120 lines covered, 93.33%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
payjoin/src/core/receive/mod.rs 120 112 93.33%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 13821
Covered Lines: 11783
Line Coverage: 85.25%
Coverage Strength: 391.53 hits per line

💛 - Coveralls

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants