(t *testing.T)
| 60 | } |
| 61 | |
| 62 | func TestGetCommitMessage(t *testing.T) { |
| 63 | dir := initTestGitRepo(t) |
| 64 | msg, err := getCommitMessage(dir, "HEAD") |
| 65 | if err != nil { |
| 66 | t.Fatalf("unexpected error: %v", err) |
| 67 | } |
| 68 | if msg != "initial commit" { |
| 69 | t.Errorf("msg = %q, want 'initial commit'", msg) |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | func TestGetCommitMessage_InvalidCommit(t *testing.T) { |
| 74 | dir := initTestGitRepo(t) |
nothing calls this directly
no test coverage detected