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

Function TestClientRemoteURLReportsMissingRemote

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

Source from the content-addressed store, hash-verified

1753}
1754
1755func TestClientRemoteURLReportsMissingRemote(t *testing.T) {
1756 // Given a repository without the requested remote
1757 repo := newTestRepo(t)
1758
1759 // When the remote URL is requested
1760 remoteURL, err := repo.client.RemoteURL(t.Context(), "nonexistent")
1761
1762 // Then Git's failure is returned
1763 require.Error(t, err)
1764 var gitErr *GitError
1765 assert.ErrorAs(t, err, &gitErr)
1766 assert.Empty(t, remoteURL)
1767}
1768
1769func TestClientRemoteURLSeparatesRemoteNameFromOptions(t *testing.T) {
1770 // Given a configured remote whose name resembles a Git option

Callers

nothing calls this directly

Calls 4

newTestRepoFunction · 0.85
RemoteURLMethod · 0.80
EmptyMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected