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

Function TestGet_TextFormat

apps/cli/internal/cli/get_test.go:218–245  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

216}
217
218func TestGet_TextFormat(t *testing.T) {
219 tmpDir := createGetTestFiles(t)
220 resetGetFlags()
221 taskDir = tmpDir
222
223 output := captureGetOutput(t, "002")
224
225 expected := []string{
226 "Task: 002",
227 "Title: Implement authentication",
228 "Status: in-progress",
229 "Priority: critical",
230 "Effort: large",
231 "Tags: backend, security",
232 "Created: 2026-02-08",
233 "File:",
234 "Description:",
235 "Add JWT-based auth with refresh tokens.",
236 "Dependencies:",
237 "Depends on: 001 (Setup project)",
238 }
239
240 for _, exp := range expected {
241 if !strings.Contains(output, exp) {
242 t.Errorf("Expected output to contain %q", exp)
243 }
244 }
245}
246
247func TestGet_JSONFormat(t *testing.T) {
248 tmpDir := createGetTestFiles(t)

Callers

nothing calls this directly

Calls 3

createGetTestFilesFunction · 0.85
resetGetFlagsFunction · 0.85
captureGetOutputFunction · 0.85

Tested by

no test coverage detected