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

Function TestMailViewHelpBindings

internal/tui/mail_test.go:268–284  ·  view source on GitHub ↗

--- Help bindings ---

(t *testing.T)

Source from the content-addressed store, hash-verified

266 if !consumed || cmd != nil {
267 t.Error("an earlier box error should be ignored")
268 }
269 if !v.requests.loading {
270 t.Error("an earlier box error should not stop the current box load")
271 }
272}
273
274func TestMailViewHandlesTopicLoaded(t *testing.T) {
275 v := mailWithPostings()
276 v.requests.loading = true
277
278 _, consumed := v.Update(topicLoadedMsg{
279 boxID: 1,
280 topicID: 100,
281 title: "Test topic",
282 entries: []mail.Entry{{Creator: mail.Contact{Name: "Alice"}, Body: htmlutil.ToMarkdown("<p>hello</p>")}},
283 })
284 if !consumed {
285 t.Error("topicLoadedMsg should be consumed")
286 }
287 if !v.inThread || v.topicID != 100 || v.topicName != "Test topic" {

Callers

nothing calls this directly

Calls 2

mailWithPostingsFunction · 0.85
HelpBindingsMethod · 0.65

Tested by

no test coverage detected