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

Function TestComposeMessageASCIISubjectUnchanged

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

Source from the content-addressed store, hash-verified

124}
125
126func TestComposeMessageASCIISubjectUnchanged(t *testing.T) {
127 // Pure-ASCII subjects should pass through without encoded-word wrapping.
128 raw, err := ComposeMessage(
129 "from@test.com", []string{"to@test.com"}, nil,
130 "Hello Alice", "Body", "text/plain", "", nil, "test.dev", "", "",
131 )
132 if err != nil {
133 t.Fatalf("ComposeMessage failed: %v", err)
134 }
135 msg, _ := mail.ReadMessage(strings.NewReader(string(raw)))
136 if got := msg.Header.Get("Subject"); got != "Hello Alice" {
137 t.Errorf("Subject = %q, want Hello Alice (no encoded-word for ASCII)", got)
138 }
139}
140
141func TestComposeMessageMultipleRecipients(t *testing.T) {
142 raw, err := ComposeMessage(

Callers

nothing calls this directly

Calls 2

ComposeMessageFunction · 0.85
GetMethod · 0.65

Tested by

no test coverage detected