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

Function TestBuildNotification_OmitsEmptyConversationID

internal/ws/handler_test.go:478–494  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

476}
477
478func TestBuildNotification_OmitsEmptyConversationID(t *testing.T) {
479 msg := &identity.Message{
480 ID: "msg_no_conv",
481 Sender: "alice@example.com",
482 Recipient: "bot@agents.e2a.dev",
483 Subject: "No Conv",
484 CreatedAt: time.Now(),
485 }
486
487 data := BuildNotification(msg)
488 var notif map[string]interface{}
489 json.Unmarshal(data, &notif)
490
491 if _, exists := notif["conversation_id"]; exists {
492 t.Fatal("expected conversation_id to be omitted when empty")
493 }
494}

Callers

nothing calls this directly

Calls 1

BuildNotificationFunction · 0.85

Tested by

no test coverage detected