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

Function TestRunImport_EmptyResult

apps/cli/internal/sync/import_engine_test.go:404–433  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

402}
403
404func TestRunImport_EmptyResult(t *testing.T) {
405 sourceName := "test-import-empty"
406 defer cleanupRegistry(sourceName)
407
408 setupMockSource(sourceName, []ExternalTask{})
409
410 dir := t.TempDir()
411
412 cfg := ImportConfig{
413 SourceName: sourceName,
414 SourceCfg: SourceConfig{Name: sourceName},
415 OutputDir: filepath.Join(dir, "tasks"),
416 ScanDir: dir,
417 }
418
419 result, err := RunImport(cfg)
420 if err != nil {
421 t.Fatalf("unexpected error: %v", err)
422 }
423
424 if len(result.Created) != 0 {
425 t.Errorf("expected 0 created, got %d", len(result.Created))
426 }
427 if len(result.Skipped) != 0 {
428 t.Errorf("expected 0 skipped, got %d", len(result.Skipped))
429 }
430 if len(result.Errors) != 0 {
431 t.Errorf("expected 0 errors, got %d", len(result.Errors))
432 }
433}
434
435func TestRunImport_JiraStatusMapping(t *testing.T) {
436 // Register mock under "jira" to trigger Jira-specific field mappings

Callers

nothing calls this directly

Calls 3

cleanupRegistryFunction · 0.85
setupMockSourceFunction · 0.85
RunImportFunction · 0.85

Tested by

no test coverage detected