MCPcopy Index your code
hub / github.com/google/go-github / TestClient_UserAgent

Function TestClient_UserAgent

github/github_test.go:1144–1159  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1142}
1143
1144func TestClient_UserAgent(t *testing.T) {
1145 t.Parallel()
1146
1147 c := mustNewClient(t)
1148
1149 if got, want := c.UserAgent(), defaultUserAgent; got != want {
1150 t.Errorf("Client.UserAgent() = %v, want %v", got, want)
1151 }
1152
1153 customUserAgent := "CustomUserAgent/1.0"
1154 c.userAgent = customUserAgent
1155
1156 if got, want := c.UserAgent(), customUserAgent; got != want {
1157 t.Errorf("Client.UserAgent() = %v, want %v", got, want)
1158 }
1159}
1160
1161func TestClient_BaseURL(t *testing.T) {
1162 t.Parallel()

Callers

nothing calls this directly

Calls 2

mustNewClientFunction · 0.85
UserAgentMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…