(t *testing.T)
| 476 | } |
| 477 | |
| 478 | func 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, ¬if) |
| 490 | |
| 491 | if _, exists := notif["conversation_id"]; exists { |
| 492 | t.Fatal("expected conversation_id to be omitted when empty") |
| 493 | } |
| 494 | } |
nothing calls this directly
no test coverage detected