(t *testing.T)
| 461 | } |
| 462 | |
| 463 | func TestCommitMsg_EmptyDiff(t *testing.T) { |
| 464 | tmpDir := createCommitMsgTestFiles(t) |
| 465 | resetCommitMsgFlags() |
| 466 | taskDir = tmpDir |
| 467 | |
| 468 | mockGitDiffAndRoot(t, "", tmpDir) |
| 469 | |
| 470 | _, err := captureCommitMsgOutput(t) |
| 471 | if err == nil { |
| 472 | t.Fatal("expected error for empty diff") |
| 473 | } |
| 474 | if !strings.Contains(err.Error(), "no task changes found") { |
| 475 | t.Errorf("expected 'no task changes found' error, got: %v", err) |
| 476 | } |
| 477 | } |
| 478 | |
| 479 | func TestCommitMsg_DiffOnlyInProgress(t *testing.T) { |
| 480 | tmpDir := createCommitMsgTestFiles(t) |
nothing calls this directly
no test coverage detected