(t *testing.T)
| 368 | } |
| 369 | |
| 370 | func TestNext_LimitExceedsAvailable(t *testing.T) { |
| 371 | tmpDir := createNextTestTaskFiles(t) |
| 372 | |
| 373 | resetNextFlags() |
| 374 | nextFormat = "json" |
| 375 | nextLimit = 100 |
| 376 | |
| 377 | output, err := captureNextOutput(t, []string{tmpDir}) |
| 378 | if err != nil { |
| 379 | t.Fatalf("runNext failed: %v", err) |
| 380 | } |
| 381 | |
| 382 | var recs []Recommendation |
| 383 | if err := json.Unmarshal([]byte(output), &recs); err != nil { |
| 384 | t.Fatalf("Failed to parse JSON: %v", err) |
| 385 | } |
| 386 | |
| 387 | // Should return all 5 actionable tasks, not error |
| 388 | if len(recs) != 5 { |
| 389 | t.Errorf("Expected 5 recommendations (all actionable), got %d", len(recs)) |
| 390 | } |
| 391 | } |
| 392 | |
| 393 | func TestNext_FilterByTag(t *testing.T) { |
| 394 | tmpDir := createNextTestTaskFiles(t) |
nothing calls this directly
no test coverage detected