Documentation
¶
Overview ¶
Package clerktest provides utilities for testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Clock ¶
type Clock struct {
// contains filtered or unexported fields
}
Clock provides a test clock which can be manually advanced through time.
func NewClockAt ¶
NewClockAt returns a Clock initialized at the given time.
type RoundTripper ¶
type RoundTripper struct { T *testing.T // Status is the response Status code. Status int // Out is the response body. Out json.RawMessage // Set this field to assert on the request method. Method string // Set this field to assert that the request path matches. Path string // Set this field to assert that the request URL querystring matches. Query *url.Values // Set this field to assert that the request body matches. In json.RawMessage }
RoundTripper can be used as a mock Transport for http.Clients. Set the RoundTripper's fields accordingly to determine the response or perform assertions on the http.Request properties.
Click to show internal directories.
Click to hide internal directories.