whisper-money/tests
Víctor Falcón 269b90ccb5 Fake the external currency-rate provider in balance-evolution tests
The stray-request guard added earlier surfaced five non-hermetic tests that
reached the real currency-rate CDN (cdn.jsdelivr.net / currency-api.pages.dev)
without an Http::fake(): four balance-evolution cases in AccountControllerTest
and one loan projection case in LoanTest. They passed on main only because CI
has network access and the request actually went out; under the guard the
unfaked request now throws, returning 500.

Adds a fakeCurrencyApi() helper in tests/Pest.php that stubs the provider's
/currencies/{code}.min.json endpoint with a deterministic 1:1 rate in the exact
shape the services parse ($response->json($currency)), and calls it from both
files' beforeEach. The stub returns null for non-matching URLs, so it never
shadows another test's own fakes nor the stray-request guard.

Note: a single global default fake in Pest.php was rejected on purpose — Laravel
resolves stubs first-match-wins in registration order, so a beforeEach-level
fake would shadow the per-test currency fakes in CurrencyConversionServiceTest
and ExchangeRateServiceTest and break their assertions.
2026-07-04 20:52:15 +02:00
..
.pest Speed up PR CI browser path (#365) 2026-05-07 20:40:13 +01:00
Browser feat(onboarding): auto-enable AI for connected banks, ask the rest (#618) 2026-07-01 07:26:52 +00:00
Feature Fake the external currency-rate provider in balance-evolution tests 2026-07-04 20:52:15 +02:00
Performance feat(transactions): make new-transaction marker cross-device (#611) 2026-06-29 19:11:37 +02:00
Support test(open-banking): e2e coverage for Enable Banking connection flows (#509) 2026-06-09 11:58:50 +02:00
Unit feat(banking): let Wise credentials be updated (#588) 2026-06-23 09:54:31 +00:00
Pest.php Fake the external currency-rate provider in balance-evolution tests 2026-07-04 20:52:15 +02:00
TestCase.php Remove encryption from browser tests and demo user (#129) 2026-02-17 11:45:27 +01:00
bootstrap.php chore: upgrade Laravel 12 to 13 (#242) 2026-03-25 12:56:33 +00:00