whisper-money/tests
Víctor Falcón 08dfb07a90
fix(banking): correct backfill-ibans endpoint and handle expired sessions gracefully (#222)
## Problem

`banking:backfill-ibans` was calling `GET /accounts/{uid}` but the
correct Enable Banking endpoint is `GET /accounts/{uid}/details`. This
caused every account to return 404, and all 404s were counted as
failures making the command exit with failure status.

Additionally, accounts whose sessions have expired or been revoked will
always return 404 — this is expected and should not be treated as an
error.

## Changes

- **`EnableBankingProvider`** — fix endpoint from `/accounts/{uid}` to
`/accounts/{uid}/details`
- **`BackfillAccountIbans`** — catch `RequestException` 404s separately
and count them as `expired/revoked session` skips rather than failures;
command exits successfully when the only issues are expired sessions
- **Tests** — add test for the 404 expired-session path; update output
string assertions

## Expected output after fix

```
Found 5 account(s) with missing IBAN.
IBAN updated for 2 account(s). Skipped (no IBAN in API response): 0. Skipped (expired/revoked session): 3. Failed: 0.
```

The 2 active-session accounts will be backfilled; the 3 from the
expired/revoked connection will be skipped cleanly.
2026-03-12 11:57:54 +00:00
..
Browser fix(browser-test): reload transactions in syncing step and fix Skip button selector (#203) 2026-03-05 11:29:06 +00:00
Feature fix(banking): correct backfill-ibans endpoint and handle expired sessions gracefully (#222) 2026-03-12 11:57:54 +00:00
Performance test: add performance test suite with query count ceilings (#148) 2026-02-24 10:47:51 +01:00
Unit feat: enable invested amount tracking for savings accounts (#142) 2026-02-23 17:19:33 +01:00
Pest.php test: add performance test suite with query count ceilings (#148) 2026-02-24 10:47:51 +01:00
TestCase.php Remove encryption from browser tests and demo user (#129) 2026-02-17 11:45:27 +01:00
bootstrap.php fix(testcontainers): stop and remove MySQL container on signal and shutdown (#202) 2026-03-05 10:57:28 +00:00