Problem
Payment validation logic in manage_hub has no dedicated test suite. Payment processing bugs — especially around tolerance and boundary values — can go undetected.
Proposed Solution
Create contracts/cntr/tests/payment_verification_tests.rs. Write at least 10 unit tests for payment validation: exact amount, overpayment (should pass), within tolerance (should pass), one stroop below tolerance (should fail), underpayment well below, zero payment, negative payment, zero expected amount, tolerance of zero, large amounts near i128 bounds. All implementation must live inside contracts/cntr/.
Acceptance Criteria
Problem
Payment validation logic in manage_hub has no dedicated test suite. Payment processing bugs — especially around tolerance and boundary values — can go undetected.
Proposed Solution
Create
contracts/cntr/tests/payment_verification_tests.rs. Write at least 10 unit tests for payment validation: exact amount, overpayment (should pass), within tolerance (should pass), one stroop below tolerance (should fail), underpayment well below, zero payment, negative payment, zero expected amount, tolerance of zero, large amounts near i128 bounds. All implementation must live insidecontracts/cntr/.Acceptance Criteria
contracts/cntr/tests/payment_verification_tests.rspayment_validator.rspeer modulecargo test