Documentation
¶
Index ¶
- func FreezeTime(t *testing.T)
- func Get(uri string, opts ...ReqOption) (*http.Response, []byte, error)
- func MakeRequest(uri string, opts ...ReqOption) (*http.Response, []byte, error)
- func MustParseRequestURI(uri string) *url.URL
- func NewHandler(handler http.HandlerFunc) *httptest.Server
- func NewResponder(t *testing.T, response string) *httptest.Server
- func Post(uri string, opts ...ReqOption) (*http.Response, []byte, error)
- type ReqOption
- type ReqOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FreezeTime ¶
FreezeTime to the predetermined time. Returns a function that should be deferred to unfreeze time. Meant for testing.
func MakeRequest ¶
MakeRequest create and do a request.
func MustParseRequestURI ¶ added in v2.0.2
MustParseRequestURI is the version of url.ParseRequestURI that panics if incorrect, helpful to shorten the tests.
func NewHandler ¶
func NewHandler(handler http.HandlerFunc) *httptest.Server
NewHandler creates a new Server.
func NewResponder ¶
NewResponder creates a new Server with response.
Types ¶
Click to show internal directories.
Click to hide internal directories.