(t *testing.T)
| 495 | } |
| 496 | |
| 497 | func TestClientLastCommit(t *testing.T) { |
| 498 | // Given a repository fixture with two commits |
| 499 | IsolateConfig(t) |
| 500 | client := Client{RepoDir: "./fixtures/simple.git"} |
| 501 | |
| 502 | // When its last commit is requested |
| 503 | commit, err := client.LastCommit(t.Context()) |
| 504 | |
| 505 | // Then the commit identity and title are returned |
| 506 | require.NoError(t, err) |
| 507 | assert.Equal(t, "6f1a2405cace1633d89a79c74c65f22fe78f9659", commit.Sha) |
| 508 | assert.Equal(t, "Second commit", commit.Title) |
| 509 | } |
| 510 | |
| 511 | func TestClientCommitBody(t *testing.T) { |
| 512 | // Given a repository fixture with a commit body |
nothing calls this directly
no test coverage detected