(t *testing.T)
| 193 | } |
| 194 | |
| 195 | func TestComposeMessageNoBccHeader(t *testing.T) { |
| 196 | // BCC should never appear in composed message headers |
| 197 | raw, err := ComposeMessage( |
| 198 | "from@test.com", |
| 199 | []string{"alice@gmail.com"}, |
| 200 | nil, |
| 201 | "Hello", |
| 202 | "Body", |
| 203 | "text/plain", |
| 204 | "", |
| 205 | nil, |
| 206 | "test.dev", |
| 207 | "", |
| 208 | "", |
| 209 | ) |
| 210 | if err != nil { |
| 211 | t.Fatalf("ComposeMessage failed: %v", err) |
| 212 | } |
| 213 | |
| 214 | if strings.Contains(strings.ToLower(string(raw)), "bcc") { |
| 215 | t.Error("composed message should never contain a Bcc header") |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | func TestComposeMessageDefaultContentType(t *testing.T) { |
| 220 | raw, err := ComposeMessage("from@test.com", []string{"to@test.com"}, nil, "Sub", "Body", "", "", nil, "test.dev", "", "") |
nothing calls this directly
no test coverage detected