MCPcopy Create free account
hub / github.com/diillson/chatcli / TestSessionAdapter_SearchNoMatch

Function TestSessionAdapter_SearchNoMatch

cli/session_adapter_test.go:49–59  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

47}
48
49func TestSessionAdapter_SearchNoMatch(t *testing.T) {
50 sm := newTestSessionManager(t)
51 a := &sessionPluginAdapter{cli: &ChatCLI{sessionManager: sm, logger: zap.NewNop()}}
52 out, err := a.Search(context.Background(), "nothing here", 3)
53 if err != nil {
54 t.Fatalf("Search: %v", err)
55 }
56 if !strings.Contains(strings.ToLower(out), "no saved session") && !strings.Contains(out, "Nenhuma") {
57 t.Fatalf("expected no-match message, got %q", out)
58 }
59}
60
61func TestSessionAdapter_List(t *testing.T) {
62 sm := newTestSessionManager(t)

Callers

nothing calls this directly

Calls 2

SearchMethod · 0.95
newTestSessionManagerFunction · 0.85

Tested by

no test coverage detected