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

Function TestErrorResponse_Error

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

Source from the content-addressed store, hash-verified

3958}
3959
3960func TestErrorResponse_Error(t *testing.T) {
3961 t.Parallel()
3962 res := &http.Response{Request: &http.Request{}}
3963 err := ErrorResponse{Message: "m", Response: res}
3964 if err.Error() == "" {
3965 t.Error("Expected non-empty ErrorResponse.Error()")
3966 }
3967
3968 // dont panic if request is nil
3969 res = &http.Response{}
3970 err = ErrorResponse{Message: "m", Response: res}
3971 if err.Error() == "" {
3972 t.Error("Expected non-empty ErrorResponse.Error()")
3973 }
3974
3975 // dont panic if response is nil
3976 err = ErrorResponse{Message: "m"}
3977 if err.Error() == "" {
3978 t.Error("Expected non-empty ErrorResponse.Error()")
3979 }
3980}
3981
3982func TestError_Error(t *testing.T) {
3983 t.Parallel()

Callers

nothing calls this directly

Calls 2

ErrorMethod · 0.95
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…