(t *testing.T)
| 94 | } |
| 95 | |
| 96 | func TestDeleteDomain(t *testing.T) { |
| 97 | srv := testServer(t) |
| 98 | req, _ := http.NewRequest("DELETE", srv.URL+"/v1/domains/acme.com?confirm=DELETE", nil) |
| 99 | req.Header.Set("Authorization", "Bearer good") |
| 100 | resp, err := http.DefaultClient.Do(req) |
| 101 | if err != nil { |
| 102 | t.Fatal(err) |
| 103 | } |
| 104 | defer resp.Body.Close() |
| 105 | if resp.StatusCode != 204 { |
| 106 | t.Fatalf("want 204, got %d", resp.StatusCode) |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | func TestDeleteDomainRequiresConfirm(t *testing.T) { |
| 111 | srv := testServer(t) |
nothing calls this directly
no test coverage detected