Documentation
¶
Overview ¶
Package ghtest serves a fake GitHub REST API over httptest for tests. Handlers return recorded response shapes, so go-github's real request and decoding paths run.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NotFound = Reply(http.StatusNotFound, map[string]string{"message": "Not Found"})
NotFound is GitHub's 404 body.
Functions ¶
Types ¶
type Server ¶
type Server struct {
Mux *http.ServeMux
Client *github.Client
// contains filtered or unexported fields
}
Server is a fake GitHub API. Register handlers on Mux with paths like "GET /repos/o/r/pulls/1".
Click to show internal directories.
Click to hide internal directories.