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

Function TestTodayNotePath

cli/workspace/memory_test.go:64–79  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

62}
63
64func TestTodayNotePath(t *testing.T) {
65 dir := t.TempDir()
66 ms := NewMemoryStore(dir, testLogger())
67
68 path := ms.TodayNotePath()
69 now := time.Now()
70 expectedDir := now.Format("200601")
71 expectedFile := now.Format("20060102") + ".md"
72
73 if !strings.Contains(path, expectedDir) {
74 t.Errorf("expected YYYYMM dir in path, got %q", path)
75 }
76 if !strings.HasSuffix(path, expectedFile) {
77 t.Errorf("expected YYYYMMDD.md filename, got %q", filepath.Base(path))
78 }
79}
80
81func TestGetRecentDailyNotes(t *testing.T) {
82 dir := t.TempDir()

Callers

nothing calls this directly

Calls 4

TodayNotePathMethod · 0.95
ErrorfMethod · 0.80
NewMemoryStoreFunction · 0.70
testLoggerFunction · 0.70

Tested by

no test coverage detected