(t *testing.T)
| 402 | } |
| 403 | |
| 404 | func 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 | |
| 435 | func TestRunImport_JiraStatusMapping(t *testing.T) { |
| 436 | // Register mock under "jira" to trigger Jira-specific field mappings |
nothing calls this directly
no test coverage detected