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

Function TestComposeMessageConversationIDHeader

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

Source from the content-addressed store, hash-verified

263}
264
265func TestComposeMessageConversationIDHeader(t *testing.T) {
266 raw, err := ComposeMessage(
267 "from@test.com", []string{"to@test.com"}, nil,
268 "Hello", "Body", "text/plain", "", nil, "test.dev", "", "081158ac-bf25-4eb6-a6b0-02828ec670c3",
269 )
270 if err != nil {
271 t.Fatalf("ComposeMessage failed: %v", err)
272 }
273 msg, _ := mail.ReadMessage(strings.NewReader(string(raw)))
274 if got := msg.Header.Get("X-E2A-Conversation-Id"); got != "081158ac-bf25-4eb6-a6b0-02828ec670c3" {
275 t.Errorf("X-E2A-Conversation-Id = %q, want the UUID", got)
276 }
277}
278
279func TestComposeMessageNoConversationIDHeader(t *testing.T) {
280 raw, err := ComposeMessage(

Callers

nothing calls this directly

Calls 2

ComposeMessageFunction · 0.85
GetMethod · 0.65

Tested by

no test coverage detected