(t *testing.T)
| 77 | type recordedMailRequest struct { |
| 78 | method string |
| 79 | path string |
| 80 | requests []string |
| 81 | rawQueries []string |
| 82 | body struct { |
| 83 | PostingIDs []int64 `json:"posting_ids"` |
| 84 | BoxID *int64 `json:"box_id"` |
| 85 | FolderID *int64 `json:"folder_id"` |
| 86 | Folder struct { |
| 87 | Name string `json:"name"` |
| 88 | } `json:"folder"` |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | func mailWithTestServer(t *testing.T, status int) (*mailView, *recordedMailRequest) { |
| 93 | t.Helper() |
| 94 | |
| 95 | recorded := &recordedMailRequest{} |
| 96 | server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| 97 | if r.URL.Path == "/boxes.json" { |
| 98 | w.Header().Set("Content-Type", "application/json") |
| 99 | _, _ = w.Write([]byte(`[ |
nothing calls this directly
no test coverage detected