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

Function TestClientCommitBody

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

Source from the content-addressed store, hash-verified

509}
510
511func TestClientCommitBody(t *testing.T) {
512 // Given a repository fixture with a commit body
513 IsolateConfig(t)
514 client := Client{RepoDir: "./fixtures/simple.git"}
515
516 // When the body is requested
517 body, err := client.CommitBody(t.Context(), "6f1a2405cace1633d89a79c74c65f22fe78f9659")
518
519 // Then the complete body is returned
520 require.NoError(t, err)
521 assert.Equal(t, "I'm starting to get the hang of things\n", body)
522}
523
524func TestClientReadBranchConfigReturnsEmptyConfigWhenUnset(t *testing.T) {
525 // Given a repository without branch configuration

Callers

nothing calls this directly

Calls 3

CommitBodyMethod · 0.95
IsolateConfigFunction · 0.85
EqualMethod · 0.80

Tested by

no test coverage detected