whisper-money/tests
Víctor Falcón 89840e19db refactor(mcp): give the write tools one way to resolve a record and to apply changed fields
Every write tool repeated two shapes. Resolving a record in the space was
copy-pasted five times (account, transaction, category, label, and the rule
resolver, which existed twice — once in UpdateAutomationRule and once in
DeleteAutomationRule), each with the same query, null check and message
template. And each update tool walked its fields with a wall of
'if ($request->has(x)) { $model->x = ... }' blocks.

Both now live in WriteTool: modelInSpace() resolves any space-scoped model with
the same failure message, and applyFields() assigns just the fields the request
carries, taking closures so a related lookup only runs when its field is
present.

UpdateTransaction::write drops from cyclomatic complexity 20 to 7 and
UpdateAutomationRule::write from 13 to 6.

Adds the missing coverage for the failure messages, which nothing asserted
before: with a listing hint, and without one.
2026-08-11 13:44:47 +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 refactor(mcp): give the write tools one way to resolve a record and to apply changed fields 2026-08-11 13:44:47 +02:00
Fixtures refactor: consolidate duplicated financial calculations (#643) 2026-07-04 22:26:44 +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 fix(mcp): declare all three MCP hints on every tool (#751) 2026-08-10 08:06:00 +00:00
Pest.php chore: harden Inertia boundary, CI type-check, and test isolation (#640) 2026-07-04 18:57:58 +00: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