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

Function TestRunStatus_DuplicateIDError

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

Source from the content-addressed store, hash-verified

344}
345
346func TestRunStatus_DuplicateIDError(t *testing.T) {
347 tmpDir := createDuplicateTestFiles(t)
348 statusFormat = "text"
349 statusExact = false
350 statusThreshold = 0.6
351 statusMinimal = false
352 statusStatusline = false
353 statusScope = ""
354 taskDir = tmpDir
355
356 err := runStatusSingle("042")
357 if err == nil {
358 t.Fatal("expected error for duplicate ID, got nil")
359 }
360 if !strings.Contains(err.Error(), "duplicate task ID") {
361 t.Errorf("expected 'duplicate task ID' error, got: %v", err)
362 }
363 if !strings.Contains(err.Error(), "042") {
364 t.Errorf("expected error to mention ID 042, got: %v", err)
365 }
366}
367
368func TestRunSet_DuplicateIDError(t *testing.T) {
369 tmpDir := createDuplicateTestFiles(t)

Callers

nothing calls this directly

Calls 3

createDuplicateTestFilesFunction · 0.85
runStatusSingleFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected