--- Help bindings ---
(t *testing.T)
| 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 | |
| 274 | func 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" { |
nothing calls this directly
no test coverage detected