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

Function TestComposeMessageMultipleRecipients

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

Source from the content-addressed store, hash-verified

139}
140
141func TestComposeMessageMultipleRecipients(t *testing.T) {
142 raw, err := ComposeMessage(
143 "from@test.com",
144 []string{"alice@gmail.com", "bob@gmail.com"},
145 []string{"carol@gmail.com"},
146 "Hello",
147 "Body",
148 "text/plain",
149 "",
150 nil,
151 "test.dev",
152 "",
153 "",
154 )
155 if err != nil {
156 t.Fatalf("ComposeMessage failed: %v", err)
157 }
158
159 msg, _ := mail.ReadMessage(strings.NewReader(string(raw)))
160 if got := msg.Header.Get("To"); got != "alice@gmail.com, bob@gmail.com" {
161 t.Errorf("To = %q, want alice@gmail.com, bob@gmail.com", got)
162 }
163 if got := msg.Header.Get("Cc"); got != "carol@gmail.com" {
164 t.Errorf("Cc = %q, want carol@gmail.com", got)
165 }
166}
167
168func TestComposeMessageCCOnlyOmitsToHeader(t *testing.T) {
169 raw, err := ComposeMessage(

Callers

nothing calls this directly

Calls 2

ComposeMessageFunction · 0.85
GetMethod · 0.65

Tested by

no test coverage detected