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

Function TestClientDeleteLocalTagReportsMissingTag

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

Source from the content-addressed store, hash-verified

932}
933
934func TestClientDeleteLocalTagReportsMissingTag(t *testing.T) {
935 // Given a repository without the requested tag
936 repo := newTestRepo(t)
937
938 // When the missing tag is deleted
939 err := repo.client.DeleteLocalTag(t.Context(), "missing")
940
941 // Then Git's missing tag error is returned
942 require.Error(t, err)
943 var gitError *GitError
944 require.ErrorAs(t, err, &gitError)
945 assert.NotZero(t, gitError.ExitCode)
946}
947
948func TestClientDeleteLocalBranchRemovesUnmergedBranch(t *testing.T) {
949 // Given a feature branch with a commit that is not merged into trunk

Callers

nothing calls this directly

Calls 3

newTestRepoFunction · 0.85
DeleteLocalTagMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected