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

Function TestComposeMessageReplyTo

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

Source from the content-addressed store, hash-verified

230}
231
232func TestComposeMessageReplyTo(t *testing.T) {
233 raw, err := ComposeMessage(
234 "from@test.com", []string{"to@test.com"}, nil, "Re: Hello", "Reply body",
235 "text/plain", "<original-msg-id@example.com>", nil, "test.dev", "", "",
236 )
237 if err != nil {
238 t.Fatalf("ComposeMessage failed: %v", err)
239 }
240
241 msg, _ := mail.ReadMessage(strings.NewReader(string(raw)))
242 if got := msg.Header.Get("In-Reply-To"); got != "<original-msg-id@example.com>" {
243 t.Errorf("In-Reply-To = %q, want <original-msg-id@example.com>", got)
244 }
245 if got := msg.Header.Get("References"); got != "<original-msg-id@example.com>" {
246 t.Errorf("References = %q, want <original-msg-id@example.com>", got)
247 }
248}
249
250func TestComposeMessageNoReplyTo(t *testing.T) {
251 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
GetMethod · 0.65

Tested by

no test coverage detected