mockhttp: Index | Files

package mockhttp

import ""


Package Files

mockrequest.go mockresponsewriter.go

func CheckResponse Uses

func CheckResponse(t *testing.T, w *httptest.ResponseRecorder, wantStatus int, wantHeaders http.Header, wantBody string) (ok bool)

CheckResponse checks that the http response matches expectations, and calls t.Error if not.

func NewRequest Uses

func NewRequest(t testing.TB, method, url string, body io.Reader) *http.Request

NewRequest is like http.NewRequest, but calls t.Fatal on error.

Package mockhttp imports 5 packages (graph). Updated 2016-07-18. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).