(t *testing.T)
| 690 | } |
| 691 | |
| 692 | func TestGraphCommand_ErrorInvalidFocus(t *testing.T) { |
| 693 | tmpDir := createTestTaskFiles(t) |
| 694 | |
| 695 | // Reset flags |
| 696 | graphFormat = "json" |
| 697 | graphExcludeStatus = []string{} |
| 698 | graphRoot = "" |
| 699 | graphFocus = "999" // Non-existent task |
| 700 | graphUpstream = false |
| 701 | graphDownstream = false |
| 702 | graphOut = "" |
| 703 | |
| 704 | // Run command and expect error |
| 705 | err := runGraph(graphCmd, []string{tmpDir}) |
| 706 | if err == nil { |
| 707 | t.Fatal("Expected error for invalid focus task") |
| 708 | } |
| 709 | |
| 710 | if !strings.Contains(err.Error(), "not found") { |
| 711 | t.Errorf("Expected 'not found' error, got: %v", err) |
| 712 | } |
| 713 | } |
| 714 | |
| 715 | func TestGraphCommand_ErrorUpstreamDownstreamWithoutRoot(t *testing.T) { |
| 716 | tmpDir := createTestTaskFiles(t) |
nothing calls this directly
no test coverage detected