refactor: refactor notification email template (#14208)

This commit is contained in:
Bruno Quaresma
2024-08-09 11:25:19 -03:00
committed by GitHub
parent abbcffe181
commit 27b8f201a4
9 changed files with 68 additions and 52 deletions

View File

@ -417,7 +417,11 @@ func TestSMTP(t *testing.T) {
require.NoError(t, hp.Set(listen.Addr().String()))
tc.cfg.Smarthost = hp
handler := dispatch.NewSMTPHandler(tc.cfg, logger.Named("smtp"))
helpers := map[string]any{
"base_url": func() string { return "http://test.com" },
"current_year": func() string { return "2024" },
}
handler := dispatch.NewSMTPHandler(tc.cfg, helpers, logger.Named("smtp"))
// Start mock SMTP server in the background.
var wg sync.WaitGroup