(t *testing.T)
| 762 | } |
| 763 | |
| 764 | func TestPrintImportTable_WithCreated(t *testing.T) { |
| 765 | result := &sync.ImportResult{ |
| 766 | Created: []sync.ImportAction{ |
| 767 | {ExternalID: "GH-1", LocalID: "001", Title: "First task"}, |
| 768 | {ExternalID: "GH-2", LocalID: "002", Title: "Second task"}, |
| 769 | }, |
| 770 | } |
| 771 | summary := importSummary{Total: 2, Created: 2} |
| 772 | |
| 773 | output := capturePrintImportTable(t, result, summary, false) |
| 774 | |
| 775 | if !strings.Contains(output, "Created 2 task(s)") { |
| 776 | t.Errorf("expected 'Created 2 task(s)', got %q", output) |
| 777 | } |
| 778 | if !strings.Contains(output, "[001] First task") { |
| 779 | t.Error("expected first task ID and title in output") |
| 780 | } |
| 781 | if !strings.Contains(output, "[002] Second task") { |
| 782 | t.Error("expected second task ID and title in output") |
| 783 | } |
| 784 | } |
| 785 | |
| 786 | func TestPrintImportTable_WithSkipped(t *testing.T) { |
| 787 | result := &sync.ImportResult{ |
nothing calls this directly
no test coverage detected