whisper-money/tests/Feature/Settings
Víctor Falcón e178f1b1bd
feat(settings): let users disable bank transactions email (#472)
## Summary

Adds a **Notifications** section to the account settings page
(`/settings/account`, between Profile information and Update password)
where users can opt out of the daily "new transactions synced" email.

- New per-user preference `notify_on_bank_transactions_synced` on
`user_settings` (defaults to `true`, opt-out).
- `SendDailyBankTransactionsSyncedEmailJob` skips users who disabled it.
- Single generic `PATCH /settings/notifications` endpoint updates any
notification type via a key→column allowlist in
`NotificationPreferenceController::PREFERENCES`. Future notifications
only need a new entry there — no new route/controller.
- Email footer now links back to the settings section so users can
manage preferences.

## Testing

- `tests/Feature/Settings/NotificationPreferenceTest.php` — update,
unknown-key rejection, invalid value, auth, create-when-missing,
default-true, inertia prop.
- `tests/Feature/OpenBanking/SyncBankingConnectionJobTest.php` — email
not sent when disabled.
2026-06-02 12:24:39 +02:00
..
AccountPageTest.php Reorganize setting items 2025-11-07 18:23:08 +00:00
AccountTest.php feat(currencies): add Colombian and Dominican peso (#471) 2026-06-01 18:14:16 +02:00
BankTest.php fix: prioritize exact bank search matches (#267) 2026-04-10 13:32:56 +01:00
BudgetSettingsRedirectTest.php fix(settings): restore budgets settings redirect (#228) 2026-03-16 13:04:08 +01:00
CategoryTest.php fix(categories): expose cashflow setting on create (#448) 2026-05-29 11:05:04 +02:00
ChartColorSchemeTest.php fix: route new PWA guests to signup (#313) 2026-04-21 10:53:05 +01:00
DeleteAccountPageTest.php Reorganize setting items 2025-11-07 18:23:08 +00:00
NetWorthChartLoanPreferenceTest.php fix: route new PWA guests to signup (#313) 2026-04-21 10:53:05 +01:00
NetWorthChartRealEstatePreferenceTest.php fix: route new PWA guests to signup (#313) 2026-04-21 10:53:05 +01:00
NotificationPreferenceTest.php feat(settings): let users disable bank transactions email (#472) 2026-06-02 12:24:39 +02:00
PasswordUpdateTest.php E2E Encryption 2025-11-07 14:21:25 +00:00
ProfileUpdateTest.php feat(currency): add Saudi Riyal (SAR) (#461) 2026-06-01 08:52:21 +02:00
TimezoneTest.php fix: route new PWA guests to signup (#313) 2026-04-21 10:53:05 +01:00
TwoFactorAuthenticationTest.php E2E Encryption 2025-11-07 14:21:25 +00:00