MCPcopy Create free account
hub / github.com/cli/cli / TestClientLastCommit

Function TestClientLastCommit

git/client_test.go:712–721  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

710}
711
712func TestClientLastCommit(t *testing.T) {
713 IsolateConfig(t)
714 client := Client{
715 RepoDir: "./fixtures/simple.git",
716 }
717 c, err := client.LastCommit(context.Background())
718 assert.NoError(t, err)
719 assert.Equal(t, "6f1a2405cace1633d89a79c74c65f22fe78f9659", c.Sha)
720 assert.Equal(t, "Second commit", c.Title)
721}
722
723func TestClientCommitBody(t *testing.T) {
724 IsolateConfig(t)

Callers

nothing calls this directly

Calls 3

LastCommitMethod · 0.95
IsolateConfigFunction · 0.85
EqualMethod · 0.80

Tested by

no test coverage detected