MCPcopy Create free account
hub / github.com/basecamp/hey-cli / TestMailViewHandlesTopicLoaded

Function TestMailViewHandlesTopicLoaded

internal/tui/mail_test.go:79–96  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

77type 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
92func 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(`[

Callers

nothing calls this directly

Calls 3

mailWithPostingsFunction · 0.85
UpdateMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected