Commit Graph

1 Commits

Author SHA1 Message Date
Víctor Falcón 43a09a94f3 Block stray HTTP requests in the Feature test suite
Feature tests could silently make real outbound HTTP requests when a code path
was not covered by an Http::fake(), which is slow, flaky and network-dependent
in CI. Adds a Feature-scoped beforeEach that calls Http::preventStrayRequests()
so any unfaked request fails loudly instead. Tests that legitimately talk to
external services register their own fakes, which take precedence.

Ran a representative HTTP-touching subset with the guard active (open banking,
exchange-rate/currency conversion, AI categorization and AI/stats reports,
analytics, Discord and Stripe webhooks, bank-logo commands): no test relied on
an unfaked real request, so no fakes had to be added.

Adds StrayHttpRequestGuardTest to lock the behavior: an unfaked request throws
StrayRequestException while a matched fake still resolves.
2026-07-04 20:23:29 +02:00