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

Function TestResolveTask_UniqueID

apps/cli/internal/cli/duplicate_test.go:293–310  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

291}
292
293func TestResolveTask_UniqueID(t *testing.T) {
294 tasks := []*model.Task{
295 {ID: "042", Title: "Task A", FilePath: "groupA/042-task-a.md"},
296 {ID: "042", Title: "Task B", FilePath: "groupB/042-task-b.md"},
297 {ID: "001", Title: "Unique Task", FilePath: "001-unique.md"},
298 }
299
300 task, err := resolveTask("001", tasks, true, 0.6)
301 if err != nil {
302 t.Fatalf("unexpected error: %v", err)
303 }
304 if task == nil {
305 t.Fatal("expected task, got nil")
306 }
307 if task.ID != "001" {
308 t.Errorf("expected ID 001, got %s", task.ID)
309 }
310}
311
312func TestRunGet_DuplicateIDError(t *testing.T) {
313 tmpDir := createDuplicateTestFiles(t)

Callers

nothing calls this directly

Calls 1

resolveTaskFunction · 0.85

Tested by

no test coverage detected