Documentation ¶
Overview ¶
Package resttest provides helper methods for testing.
Index ¶
- func ExpectMessage(t *testing.T, wrap wrapped.Response, msg string)
- func ExpectStatusAndMessage(t *testing.T, resp *http.Response, wrap wrapped.Response, code int, msg string)
- func ExpectStatusCode(t *testing.T, resp *http.Response, wrap wrapped.Response, code int)
- func ParseToWrapped(t *testing.T, r io.Reader) wrapped.Response
- func Request(t *testing.T, method, url string, body interface{}) *http.Request
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpectMessage ¶
ExpectMessage expects message in wrapped.Response.
func ExpectStatusAndMessage ¶
func ExpectStatusAndMessage(t *testing.T, resp *http.Response, wrap wrapped.Response, code int, msg string)
ExpectStatusAndMessage expects statusCode statusCode in http.Response and in wrapped.Response and message in wrapped.Response.
func ExpectStatusCode ¶
ExpectStatusCode expects statusCode in http.Response and in wrapped.Response.
func ParseToWrapped ¶
ParseToWrapped will parse r into wrapped.Response.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.