(t *testing.T)
| 62 | } |
| 63 | |
| 64 | func 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 | |
| 81 | func TestGetRecentDailyNotes(t *testing.T) { |
| 82 | dir := t.TempDir() |
nothing calls this directly
no test coverage detected