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

Function TestUnauthenticatedRateLimitedTransport_transport

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

Source from the content-addressed store, hash-verified

4058}
4059
4060func TestUnauthenticatedRateLimitedTransport_transport(t *testing.T) {
4061 t.Parallel()
4062 // default transport
4063 tp := &UnauthenticatedRateLimitedTransport{
4064 ClientID: "id",
4065 ClientSecret: "secret",
4066 }
4067 if tp.transport() != http.DefaultTransport {
4068 t.Error("Expected http.DefaultTransport to be used.")
4069 }
4070
4071 // custom transport
4072 tp = &UnauthenticatedRateLimitedTransport{
4073 ClientID: "id",
4074 ClientSecret: "secret",
4075 Transport: &http.Transport{},
4076 }
4077 if tp.transport() == http.DefaultTransport {
4078 t.Error("Expected custom transport to be used.")
4079 }
4080}
4081
4082func TestBasicAuthTransport(t *testing.T) {
4083 t.Parallel()

Callers

nothing calls this directly

Calls 2

transportMethod · 0.95
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…