MCPcopy Create free account
hub / github.com/driangle/taskmd / TestScanWorklogEntries

Function TestScanWorklogEntries

apps/cli/internal/cli/feed_test.go:634–656  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

632}
633
634func TestScanWorklogEntries(t *testing.T) {
635 tmpDir := t.TempDir()
636 createWorklogFiles(t, tmpDir)
637
638 entries := feed.ScanWorklogEntries(tmpDir, "cli", "", false)
639 if len(entries) != 2 {
640 t.Fatalf("expected 2 worklog entries, got %d", len(entries))
641 }
642
643 // Should be sorted newest first
644 if entries[0].Message != "Completed login endpoint." {
645 t.Errorf("expected newest entry first, got: %s", entries[0].Message)
646 }
647 if entries[0].Source != "worklog" {
648 t.Errorf("expected source 'worklog', got: %s", entries[0].Source)
649 }
650 if entries[0].TaskID != "015" {
651 t.Errorf("expected task ID '015', got: %s", entries[0].TaskID)
652 }
653 if entries[1].Message != "Started implementation of the search feature." {
654 t.Errorf("expected older entry second, got: %s", entries[1].Message)
655 }
656}
657
658func TestScanWorklogEntries_SinceFilter(t *testing.T) {
659 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 1

createWorklogFilesFunction · 0.85

Tested by

no test coverage detected