MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / TestComposeMessageNoBccHeader

Function TestComposeMessageNoBccHeader

internal/outbound/compose_test.go:195–217  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

193}
194
195func TestComposeMessageNoBccHeader(t *testing.T) {
196 // BCC should never appear in composed message headers
197 raw, err := ComposeMessage(
198 "from@test.com",
199 []string{"alice@gmail.com"},
200 nil,
201 "Hello",
202 "Body",
203 "text/plain",
204 "",
205 nil,
206 "test.dev",
207 "",
208 "",
209 )
210 if err != nil {
211 t.Fatalf("ComposeMessage failed: %v", err)
212 }
213
214 if strings.Contains(strings.ToLower(string(raw)), "bcc") {
215 t.Error("composed message should never contain a Bcc header")
216 }
217}
218
219func TestComposeMessageDefaultContentType(t *testing.T) {
220 raw, err := ComposeMessage("from@test.com", []string{"to@test.com"}, nil, "Sub", "Body", "", "", nil, "test.dev", "", "")

Callers

nothing calls this directly

Calls 2

ComposeMessageFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected