diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-26 23:21:47 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-26 23:21:47 +0200 |
| commit | de7c0d61f5e1d195062f41f42dd1acd8d4e4e24a (patch) | |
| tree | fd21714eb743ad56d9d74dcc65480345893512aa /internal/askcli/formatter_test.go | |
| parent | b0392db09b960e70caf73db41cc74c9182733935 (diff) | |
Implement ask started-task info 4c3640dc-3730-40c9-bfa6-db90564e3171
Diffstat (limited to 'internal/askcli/formatter_test.go')
| -rw-r--r-- | internal/askcli/formatter_test.go | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/internal/askcli/formatter_test.go b/internal/askcli/formatter_test.go index adb1e6e..52632f5 100644 --- a/internal/askcli/formatter_test.go +++ b/internal/askcli/formatter_test.go @@ -20,6 +20,9 @@ func TestFormatTaskList(t *testing.T) { if !strings.Contains(lines[0], "UUID") || !strings.Contains(lines[0], "Priority") { t.Fatalf("header missing UUID or Priority column: %s", lines[0]) } + if !strings.Contains(lines[0], "Started") { + t.Fatalf("header missing Started column: %s", lines[0]) + } if !strings.Contains(lines[2], "uuid-1") { t.Fatalf("first task line missing uuid-1: %s", lines[2]) } @@ -55,11 +58,12 @@ func TestFormatTaskList_AlignsHeaderAndSeparator(t *testing.T) { } widths := taskListWidthsFor(tasks) - wantHeader := fmt.Sprintf("%-*s | %-*s | %-*s | %-*s | %-*s | %-*s", + wantHeader := fmt.Sprintf("%-*s | %-*s | %-*s | %-*s | %-*s | %-*s | %-*s", widths.Urgency, "Urgency", widths.Priority, "Priority", widths.UUID, "UUID", widths.Status, "Status", + widths.Started, "Started", widths.Tags, "Tags", widths.Description, "Description", ) @@ -95,6 +99,12 @@ func TestFormatTaskInfo(t *testing.T) { if !strings.Contains(output, "H") { t.Fatalf("FormatTaskInfo missing priority H: %s", output) } + if !strings.Contains(output, "Started: yes") { + t.Fatalf("FormatTaskInfo missing explicit started state: %s", output) + } + if !strings.Contains(output, "Start time: 2026-03-22T10:00:00Z") { + t.Fatalf("FormatTaskInfo missing start timestamp: %s", output) + } if !strings.Contains(output, "cli, agent") { t.Fatalf("FormatTaskInfo missing tags: %s", output) } @@ -189,6 +199,9 @@ func TestFormatTaskInfo_NoOptionalFields(t *testing.T) { if !strings.Contains(output, "simple-uuid") { t.Fatalf("FormatTaskInfo missing UUID: %s", output) } + if !strings.Contains(output, "Started: no") { + t.Fatalf("FormatTaskInfo should show Started: no when not started: %s", output) + } if strings.Contains(output, "Tags:") { t.Fatalf("FormatTaskInfo should not contain Tags: for empty tags: %s", output) } |
