(t *testing.T)
| 98 | } |
| 99 | |
| 100 | func TestExtractThreadInfoReplyToMultiAddress(t *testing.T) { |
| 101 | // RFC 5322 § 3.6.2 permits Reply-To to carry multiple addresses; SDK |
| 102 | // consumers receive the full list so they can fan replies out themselves. |
| 103 | raw := []byte("Message-Id: <x@example.com>\r\nSubject: Hi\r\n" + |
| 104 | "From: notifications@mail.example.com\r\n" + |
| 105 | "Reply-To: \"Alice\" <alice@example.com>, ceo@company.com\r\n" + |
| 106 | "To: bot@agent.example.com\r\n\r\nBody\r\n") |
| 107 | |
| 108 | info := extractThreadInfo(raw) |
| 109 | |
| 110 | want := []string{"alice@example.com", "ceo@company.com"} |
| 111 | if !reflect.DeepEqual(info.ReplyTo, want) { |
| 112 | t.Errorf("ReplyTo = %v, want %v", info.ReplyTo, want) |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | func TestExtractThreadInfoToCcLists(t *testing.T) { |
| 117 | raw := []byte("Message-Id: <m@gmail.com>\r\nSubject: Group\r\nFrom: alice@example.com\r\n" + |
nothing calls this directly
no test coverage detected