updated layout for webmail and added http dns letsencrypt
This commit is contained in:
@@ -56,6 +56,12 @@ func TestWebmailComposeSendLocalDelivery(t *testing.T) {
|
||||
if len(senderSent) != 1 {
|
||||
t.Fatalf("expected 1 message in sender's Sent folder, got %d", len(senderSent))
|
||||
}
|
||||
if isUnread(senderSent[0].Flags) {
|
||||
t.Error("expected the Sent copy to be marked read, not unread")
|
||||
}
|
||||
if !isUnread(recipientMsgs[0].Flags) {
|
||||
t.Error("expected the recipient's INBOX copy to still be unread")
|
||||
}
|
||||
|
||||
// Recipient can actually read it via the message view.
|
||||
recipientCookie := webmailLoginSession(t, app, recipientID)
|
||||
@@ -70,12 +76,17 @@ func TestWebmailComposeSendLocalDelivery(t *testing.T) {
|
||||
t.Error("expected the message body in the rendered view")
|
||||
}
|
||||
|
||||
// It's also recorded in the admin email log for visibility.
|
||||
// It's also recorded in the admin email log for visibility — but never with the
|
||||
// real body content (privacy default; the Sent folder above already keeps the
|
||||
// real, encrypted-at-rest copy).
|
||||
logs, _ := app.DB.ListEmailLogsPage(0, 10)
|
||||
found := false
|
||||
for _, l := range logs {
|
||||
if l.Subject == "Hello there" && l.MailFrom == "sender@example.com" {
|
||||
found = true
|
||||
if strings.Contains(l.MessageBody, "This is the message body.") {
|
||||
t.Errorf("expected the real body not to be logged, got %q", l.MessageBody)
|
||||
}
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
|
||||
Reference in New Issue
Block a user