test(settings): hit canonical /api/v1/invoices in module-gate tests #215
Loading…
Reference in a new issue
No description provided.
Delete branch "chore/checks-workflow-986a08ef"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The PMS-113 module-gate tests (disabled_module_returns_404_on_route_access, enabled_module_response_unchanged) probed /api/v1/billing/invoices, which is not a registered route. The billing router merges its paths flat (/invoices, /payments, ...) so the canonical invoices surface is /api/v1/invoices, as exercised by tests/billing.rs and tests/audit_hooks.rs. The bogus /billing/ prefix never matched a route, so every request fell through to the API fallback HTML and returned 404 regardless of module-gate state. That made the "enabled module must serve 200" assertions fail and made the "disabled module must 404" assertion pass for the wrong reason (fallback, not the RequireBilling gate). Pointing all four GETs at /api/v1/invoices exercises the RequireBilling extractor as intended: 200 when billing is enabled, 404 from the gate when disabled.
#PMS-282