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

Function TestGetColumnValue_Parent

apps/cli/internal/cli/list_test.go:230–248  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

228}
229
230func TestGetColumnValue_Parent(t *testing.T) {
231 task := &model.Task{
232 ID: "001",
233 Title: "Test Task",
234 Parent: "010",
235 }
236
237 result := getColumnValue(task, "parent")
238 if result != "010" {
239 t.Errorf("getColumnValue(parent) = %s, want 010", result)
240 }
241
242 // Empty parent
243 task2 := &model.Task{ID: "002", Title: "No Parent"}
244 result2 := getColumnValue(task2, "parent")
245 if result2 != "" {
246 t.Errorf("getColumnValue(parent) for task without parent = %q, want empty", result2)
247 }
248}
249
250func TestListCommand_ParentColumn(t *testing.T) {
251 resetListFlags()

Callers

nothing calls this directly

Calls 1

getColumnValueFunction · 0.85

Tested by

no test coverage detected