Skip to content

Commit 9ebdb6f

Browse files
committed
Fix test
1 parent bfbf974 commit 9ebdb6f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

coderd/notifications/dispatch/smtp_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"net"
1010
"sync"
1111
"testing"
12-
"text/template"
1312

1413
"github.com/emersion/go-sasl"
1514
"github.com/emersion/go-smtp"
@@ -418,7 +417,11 @@ func TestSMTP(t *testing.T) {
418417
require.NoError(t, hp.Set(listen.Addr().String()))
419418
tc.cfg.Smarthost = hp
420419

421-
handler := dispatch.NewSMTPHandler(tc.cfg, template.FuncMap{}, logger.Named("smtp"))
420+
helpers := map[string]any{
421+
"base_url": func() string { return "http://test.com" },
422+
"current_year": func() string { return "2024" },
423+
}
424+
handler := dispatch.NewSMTPHandler(tc.cfg, helpers, logger.Named("smtp"))
422425

423426
// Start mock SMTP server in the background.
424427
var wg sync.WaitGroup

0 commit comments

Comments
 (0)