Send reply mail from the post event bus (#16)
Stacks on #15. Handlers only persist and publish; a mail subscriber sends reply email. Unset Resend stays a no-op. Reviewed-on: #16 Co-authored-by: codegirl-007 <s.raide@gmail.com>
This commit was merged in pull request #16.
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"plumber/internal/events"
|
||||
"plumber/internal/mail"
|
||||
"plumber/internal/pacific"
|
||||
"plumber/internal/store"
|
||||
@@ -263,8 +264,12 @@ func TestEditPostRoutePermissions(t *testing.T) {
|
||||
func TestPostReplyNotifications(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
mem := store.NewMemory()
|
||||
bus := events.New()
|
||||
defer bus.Close()
|
||||
recording := &mail.Recording{}
|
||||
srv, mem := newTestServer(t, Config{Mail: recording})
|
||||
mail.Subscribe(bus, mem, recording)
|
||||
srv := newTestServerStore(t, mem, Config{Events: bus})
|
||||
handler := srv.Handler()
|
||||
homeowner := seedUser(t, mem, uniq("homeowner"), "hunter22", store.RoleUser)
|
||||
admin := seedUser(t, mem, uniq("admin"), "hunter22", store.RoleAdmin)
|
||||
|
||||
Reference in New Issue
Block a user