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

Function TestHandler_DeleteSession

server/handler_test.go:266–279  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

264}
265
266func TestHandler_DeleteSession(t *testing.T) {
267 logger := zap.NewNop()
268 store := &mockSessionStore{}
269 store.On("DeleteSession", "old-session").Return(nil)
270
271 handler := &Handler{
272 sessionManager: store,
273 logger: logger,
274 }
275
276 resp, err := handler.DeleteSession(context.Background(), &pb.DeleteSessionRequest{Name: "old-session"})
277 assert.NoError(t, err)
278 assert.True(t, resp.Success)
279}
280
281func TestHandler_NoSessionManager(t *testing.T) {
282 logger := zap.NewNop()

Callers

nothing calls this directly

Calls 1

DeleteSessionMethod · 0.95

Tested by

no test coverage detected