(t *testing.T)
| 57 | } |
| 58 | |
| 59 | func TestExtractThreadInfoWithReplyHeaders(t *testing.T) { |
| 60 | raw := []byte("Message-Id: <reply@gmail.com>\r\nSubject: Re: Hello\r\nIn-Reply-To: <orig@agent.com>\r\nReferences: <first@agent.com> <orig@agent.com>\r\nFrom: alice@example.com\r\nTo: bot@agent.example.com\r\n\r\nReply body\r\n") |
| 61 | |
| 62 | info := extractThreadInfo(raw) |
| 63 | |
| 64 | if info.InReplyTo != "<orig@agent.com>" { |
| 65 | t.Errorf("InReplyTo = %q, want %q", info.InReplyTo, "<orig@agent.com>") |
| 66 | } |
| 67 | if len(info.References) != 2 { |
| 68 | t.Fatalf("References count = %d, want 2", len(info.References)) |
| 69 | } |
| 70 | if info.References[0] != "<first@agent.com>" { |
| 71 | t.Errorf("References[0] = %q, want %q", info.References[0], "<first@agent.com>") |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | func TestExtractThreadInfoReplyTo(t *testing.T) { |
| 76 | // Outbound messages from the e2a relay set From: to the platform alias and |
nothing calls this directly
no test coverage detected