Documentation ¶
Index ¶
- func CheckJSON(t *testing.T, r io.ReadCloser, v interface{}, expect interface{})
- func CheckMultipart(t *testing.T, body io.ReadCloser, h http.Header, v interface{}, ...)
- func CheckQuery(t *testing.T, query url.Values, expect url.Values)
- func WriteJSON(t *testing.T, w http.ResponseWriter, v interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckJSON ¶
func CheckJSON(t *testing.T, r io.ReadCloser, v interface{}, expect interface{})
CheckJSON checks the body extracted from the passed io.ReadCloser against the passed expected value, assuming the body contains JSON data. v will be used to decode into and should not contain any data.
func CheckMultipart ¶
func CheckMultipart( t *testing.T, body io.ReadCloser, h http.Header, v interface{}, expectJSON interface{}, f []sendpart.File, )
CheckMultipart checks if the passed request contains the passed JSON body and the passed []api.SendMessageFile.
The expectJSON parameter may be nil, indicating no JSON body.
func CheckQuery ¶
CheckQuery checks if the passed query contains the values found in except.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.