Problem
Escrow release and refund logic has no test coverage for edge cases. Disputed bookings, boundary cancellation windows, and zero-amount scenarios are entirely untested.
Proposed Solution
Create contracts/cntr/tests/escrow_edge_case_tests.rs. Write at least 10 unit tests covering: normal release after dispute window, release attempt before dispute window closes, refund at exactly 48h boundary, refund at 23h 59m (below 24h), refund at exactly 24h, zero-amount booking refund, 100% refund correct calculation, 50% refund integer division, release blocked because booking not completed, both conditions required for release. All implementation must live inside contracts/cntr/.
Acceptance Criteria
Problem
Escrow release and refund logic has no test coverage for edge cases. Disputed bookings, boundary cancellation windows, and zero-amount scenarios are entirely untested.
Proposed Solution
Create
contracts/cntr/tests/escrow_edge_case_tests.rs. Write at least 10 unit tests covering: normal release after dispute window, release attempt before dispute window closes, refund at exactly 48h boundary, refund at 23h 59m (below 24h), refund at exactly 24h, zero-amount booking refund, 100% refund correct calculation, 50% refund integer division, release blocked because booking not completed, both conditions required for release. All implementation must live insidecontracts/cntr/.Acceptance Criteria
contracts/cntr/tests/escrow_edge_case_tests.rsescrow_release.rsandescrow_refund.rspeer modulescargo test