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

Function TestMailViewBoxShortcut

internal/tui/mail_test.go:297–309  ·  view source on GitHub ↗

--- Box shortcuts ---

(t *testing.T)

Source from the content-addressed store, hash-verified

295 topicID: 100,
296 title: "Quarterly planning",
297 entries: []mail.Entry{{
298 Creator: mail.Contact{Name: "Jane Doe"},
299 CreatedAt: time.Date(2026, 1, 8, 13, 34, 0, 0, time.UTC),
300 Summary: "Can we meet Thursday?",
301 Body: htmlutil.ToMarkdown("<p>Can we meet Thursday to walk through the numbers?</p>"),
302 }},
303 })
304
305 lines := strings.Split(ansi.Strip(v.topicContent), "\n")
306 if len(lines) < 5 {
307 t.Fatalf("thread content = %q", v.topicContent)
308 }
309 if strings.TrimSpace(lines[0]) != "Quarterly planning" || !strings.HasPrefix(lines[0], " ") {
310 t.Errorf("first line should be the centered subject: %q", lines[0])
311 }
312 if strings.TrimSpace(lines[1]) != "" {

Callers

nothing calls this directly

Calls 3

mailWithPostingsFunction · 0.85
handleBoxShortcutMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected