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

Function TestNewRequest_badMethod

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

Source from the content-addressed store, hash-verified

1614}
1615
1616func TestNewRequest_badMethod(t *testing.T) {
1617 t.Parallel()
1618 c := mustNewClient(t)
1619 if _, err := c.NewRequest(t.Context(), "BOGUS\nMETHOD", ".", nil); err == nil {
1620 t.Fatal("NewRequest returned nil; expected error")
1621 }
1622}
1623
1624// ensure that no User-Agent header is set if the client's UserAgent is empty.
1625// This caused a problem with Google's internal http client.

Callers

nothing calls this directly

Calls 2

mustNewClientFunction · 0.85
NewRequestMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…