(t *testing.T)
| 130 | case "/contacts/88.json": |
| 131 | _, _ = w.Write([]byte(`{"id":88,"name":"GitHub","entries_title":"All threads with GitHub","postings":[{"id":513,"kind":"topic","name":"Deploy failed on main","seen":true,"app_url":"https://app.hey.com/topics/100","created_at":"2026-08-25T09:00:00Z","creator":{"id":88,"name":"GitHub"}},{"id":514,"kind":"topic","name":"Nightly build is green again","seen":true,"app_url":"https://app.hey.com/topics/101","created_at":"2026-08-24T21:00:00Z","creator":{"id":88,"name":"GitHub"}}]}`)) |
| 132 | case "/topics/100/entries.json": |
| 133 | _, _ = w.Write([]byte(`[{"id":501,"kind":"message","summary":"Hello world","created_at":"2026-08-19T09:00:00Z","creator":{"id":10,"name":"Alice"}}]`)) |
| 134 | case "/messages/501.json": |
| 135 | _, _ = w.Write([]byte(`{"id":501,"subject":"Hello world","content":"<p>Message body</p>","created_at":"2026-08-19T09:00:00Z","creator":{"id":10,"name":"Alice"}}`)) |
| 136 | default: |
| 137 | if r.Method == http.MethodDelete { |
| 138 | for _, value := range strings.Split(r.URL.Query().Get("posting_ids"), ",") { |
| 139 | if id, err := strconv.ParseInt(value, 10, 64); err == nil { |
| 140 | recorded.body.PostingIDs = append(recorded.body.PostingIDs, id) |
| 141 | } |
| 142 | } |
| 143 | } else { |
| 144 | _ = json.NewDecoder(r.Body).Decode(&recorded.body) |
| 145 | } |
| 146 | w.WriteHeader(status) |
| 147 | } |
| 148 | })) |
| 149 | t.Cleanup(server.Close) |
nothing calls this directly
no test coverage detected