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

Function TestClientHasLocalBranchRejectsMissingBranch

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

Source from the content-addressed store, hash-verified

990}
991
992func TestClientHasLocalBranchRejectsMissingBranch(t *testing.T) {
993 // Given a repository without a feature branch
994 repo := newTestRepo(t)
995
996 // When the local branch is checked
997 exists := repo.client.HasLocalBranch(t.Context(), "feature")
998
999 // Then the branch is not found
1000 assert.False(t, exists, "missing branch should not resolve")
1001}
1002
1003func TestClientCheckoutBranchSwitchesBranches(t *testing.T) {
1004 // Given a repository checked out on feature with a trunk branch

Callers

nothing calls this directly

Calls 2

newTestRepoFunction · 0.85
HasLocalBranchMethod · 0.65

Tested by

no test coverage detected