(t *testing.T)
| 470 | } |
| 471 | |
| 472 | func TestContext_Dependencies(t *testing.T) { |
| 473 | tmpDir := createContextTestFiles(t) |
| 474 | resetContextFlags() |
| 475 | taskDir = tmpDir |
| 476 | setupTestConfig(t, tmpDir) |
| 477 | |
| 478 | ctxTaskID = "004" |
| 479 | output, err := captureContextOutput(t) |
| 480 | if err != nil { |
| 481 | t.Fatalf("unexpected error: %v", err) |
| 482 | } |
| 483 | |
| 484 | if !strings.Contains(output, "Dependencies") { |
| 485 | t.Errorf("expected Dependencies section, got: %s", output) |
| 486 | } |
| 487 | if !strings.Contains(output, "001") { |
| 488 | t.Errorf("expected dependency ID 001, got: %s", output) |
| 489 | } |
| 490 | } |
| 491 | |
| 492 | // setupTestConfig sets viper to read the .taskmd.yaml from the test directory. |
| 493 | func setupTestConfig(t *testing.T, dir string) { |
nothing calls this directly
no test coverage detected