(t *testing.T)
| 79 | } |
| 80 | |
| 81 | func TestGetRecentDailyNotes(t *testing.T) { |
| 82 | dir := t.TempDir() |
| 83 | ms := NewMemoryStore(dir, testLogger()) |
| 84 | |
| 85 | // Create today's note |
| 86 | _ = ms.WriteDailyNote("today's entry") |
| 87 | |
| 88 | notes := ms.GetRecentDailyNotes(3) |
| 89 | if len(notes) != 1 { |
| 90 | t.Errorf("expected 1 note, got %d", len(notes)) |
| 91 | } |
| 92 | if len(notes) > 0 && !strings.Contains(notes[0].Content, "today's entry") { |
| 93 | t.Error("expected today's entry in notes") |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | func TestGetMemoryContext(t *testing.T) { |
| 98 | dir := t.TempDir() |
nothing calls this directly
no test coverage detected