package http import ( "encoding/xml" "testing" ) func TestAutodiscover(t *testing.T) { // Request by Thunderbird. const body = ` test@example.org http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a ` var req autodiscoverRequest if err := xml.Unmarshal([]byte(body), &req); err != nil { t.Fatalf("unmarshal autodiscover request: %v", err) } if req.Request.EmailAddress != "test@example.org" { t.Fatalf("emailaddress: got %q, expected %q", req.Request.EmailAddress, "test@example.org") } }