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

Function TestPrintImportTable_WithCreated

apps/cli/internal/cli/importcmd_test.go:764–784  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

762}
763
764func 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
786func TestPrintImportTable_WithSkipped(t *testing.T) {
787 result := &sync.ImportResult{

Callers

nothing calls this directly

Calls 2

capturePrintImportTableFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected