8func TestAutodiscover(t *testing.T) {
9 // Request by Thunderbird.
10 const body = `<?xml version="1.0" encoding="utf-8"?>
11 <Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006">
13 <EMailAddress>test@example.org</EMailAddress>
14 <AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a</AcceptableResponseSchema>
18 var req autodiscoverRequest
19 if err := xml.Unmarshal([]byte(body), &req); err != nil {
20 t.Fatalf("unmarshal autodiscover request: %v", err)
23 if req.Request.EmailAddress != "test@example.org" {
24 t.Fatalf("emailaddress: got %q, expected %q", req.Request.EmailAddress, "test@example.org")