discourse/spec/mailers
Selase Krakani 467fcb460a
FIX: Missing/incorrect flag reason in account_deleted emails (#34955)
`UserNotifications#account_deleted` builds a localized flag reason from
the reviewable’s first `reviewable_score` (falling back to `spam` if
none is found).

Currently, some score types (e.g. `needs_approval`) are not covered. In
cases where a "Needs Approval" flag led to an account deletion, the
lookup key could end up as `flag_reasons.`, causing the entire
`flag_reasons`
 section to be rendered instead of a single entry.

This change adds support for additional score types (like
`needs_approval`). If no translation exists (e.g. custom flags), the
flag’s description will be used if available, before falling back to the
default `spam` reason.

More context:
https://meta.discourse.org/t/ruby-hash-syntax-being-displayed-in-emails-sent-to-deleted-users/382411
2025-11-17 15:22:22 +00:00
..
group_smtp_mailer_spec.rb UX: Use a dropdown for SSL mode for group SMTP (#27932) 2024-07-18 10:33:14 +10:00
invite_mailer_spec.rb DEV: fix flaky invite_mailer_spec test (#35664) 2025-10-29 11:14:36 -04:00
rejection_mailer_spec.rb DEV: Update rubocop-discourse to latest version 2024-03-04 15:08:35 +01:00
subscription_mailer_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
test_mailer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
user_notifications_spec.rb FIX: Missing/incorrect flag reason in account_deleted emails (#34955) 2025-11-17 15:22:22 +00:00
version_mailer_spec.rb DEV: Update the rubocop-discourse gem 2023-06-26 11:41:52 +02:00