TestVerifyDomainMXMissing — verification now requires the inbound MX too, not just the ownership TXT, so that inbound_mx.status="verified" (derived from the domain's verified flag) is honest. TXT present but MX missing ⇒ 412, not verified.
(t *testing.T)
| 154 | // just the ownership TXT, so that inbound_mx.status="verified" (derived from the |
| 155 | // domain's verified flag) is honest. TXT present but MX missing ⇒ 412, not verified. |
| 156 | func TestVerifyDomainMXMissing(t *testing.T) { |
| 157 | srv := testServer(t) |
| 158 | code, body := postJSON(t, srv.URL+"/v1/domains/nomx.com/verify", "good", nil) |
| 159 | if code != 412 || body["verified"] != false { |
| 160 | t.Fatalf("want 412 not-verified (MX missing), got %d %v", code, body) |
| 161 | } |
| 162 | if body["mx"] != "missing" { |
| 163 | t.Fatalf("expected mx=missing diagnostic in 412 body, got %v", body) |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | func TestVerifyDomainSuccess(t *testing.T) { |
| 168 | srv := testServer(t) |
nothing calls this directly
no test coverage detected