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

Function TestCredentialPatternFromHost

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

Source from the content-addressed store, hash-verified

1667}
1668
1669func TestCredentialPatternFromHost(t *testing.T) {
1670 // Given a Git host
1671 host := "github.com"
1672
1673 // When its credential scope is derived
1674 credentialPattern := CredentialPatternFromHost(host)
1675
1676 // Then credentials are scoped to that host over HTTPS
1677 assert.Equal(t, CredentialPattern{pattern: "https://github.com"}, credentialPattern)
1678}
1679
1680func TestParsePushDefault(t *testing.T) {
1681 tests := []struct {

Callers

nothing calls this directly

Calls 2

EqualMethod · 0.80

Tested by

no test coverage detected