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

Function TestMailViewInThread

internal/tui/mail_test.go:231–244  ·  view source on GitHub ↗

--- Thread state ---

(t *testing.T)

Source from the content-addressed store, hash-verified

229 v.Update(current)
230 v.Update(stale)
231
232 if len(v.postingList.postings) != 1 || v.postingList.postings[0].ID != 300 {
233 t.Errorf("an earlier box visit overwrote the current postings: %v", v.postingList.postings)
234 }
235}
236
237func TestMailViewReportsCurrentPostingLoadFailure(t *testing.T) {
238 v, _ := mailWithTestServer(t, http.StatusBadRequest)
239
240 failed, ok := runCmd(v.SubnavRight()).(postingsLoadedMsg)
241 if !ok || failed.err == nil {
242 t.Fatalf("posting load returned %#v, want an error", failed)
243 }
244 cmd, consumed := v.Update(failed)
245
246 if !consumed || cmd == nil {
247 t.Fatal("current posting load error should be reported")

Callers

nothing calls this directly

Calls 5

newMailViewFunction · 0.85
testVCFunction · 0.85
InThreadMethod · 0.65
ExitThreadMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected