TestClearWipesQueue: /clear resets the conversation, so a queued follow-up must go with it (it would target a conversation that no longer exists).
(t *testing.T)
| 280 | } |
| 281 | |
| 282 | // TestClearWipesQueue: /clear resets the conversation, so a queued follow-up must |
| 283 | // go with it (it would target a conversation that no longer exists). |
| 284 | func TestClearWipesQueue(t *testing.T) { |
| 285 | m := newTestModel(t, func(http.ResponseWriter, *http.Request) {}) |
| 286 | m.queued = &queuedPrompt{send: "stale", echo: "stale"} |
| 287 | out, _ := m.runSlash("/clear") |
| 288 | if out.(Model).queued != nil { |
| 289 | t.Fatalf("/clear must wipe the queued slot, got %+v", out.(Model).queued) |
| 290 | } |
| 291 | } |
| 292 |
nothing calls this directly
no test coverage detected