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

Function TestMailViewContentKeyUpDown

internal/tui/mail_test.go:150–166  ·  view source on GitHub ↗

--- Content key handling ---

(t *testing.T)

Source from the content-addressed store, hash-verified

148}
149
150// --- Init ---
151
152func TestMailViewInitFetchesBoxes(t *testing.T) {
153 v := newMailView(testVC())
154 cmd := v.Init()
155 if cmd == nil {
156 t.Fatal("Init with no boxes should return a fetch command")
157 }
158 if !v.requests.loading {
159 t.Error("Init should set loading = true")
160 }
161}
162
163func TestMailViewInitRefetchesWhenBoxesLoaded(t *testing.T) {
164 v := newMailView(testVC())
165 v.boxes = testBoxes()
166 v.boxIndex = 0
167 cmd := v.Init()
168 if cmd == nil {
169 t.Fatal("Init with boxes should return a fetch command for current box")

Callers

nothing calls this directly

Calls 3

mailWithPostingsFunction · 0.85
keyPressFunction · 0.85
HandleContentKeyMethod · 0.65

Tested by

no test coverage detected