Documentation ¶
Index ¶
- func ContentType(t *testing.T, expected string, rr *httptest.ResponseRecorder)
- func Header(t *testing.T, key string, val string, headers hasHeaders)
- func JSONBody(t *testing.T, expected interface{}, body hasBytes)
- func Ok(t *testing.T, rr *httptest.ResponseRecorder)
- func Status(t *testing.T, expected int, rr *httptest.ResponseRecorder)
- func StringBody(t *testing.T, expected string, rr *httptest.ResponseRecorder)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContentType ¶
func ContentType(t *testing.T, expected string, rr *httptest.ResponseRecorder)
ContentType expects the given response to have the given Content-Type header
func Ok ¶
func Ok(t *testing.T, rr *httptest.ResponseRecorder)
Ok expects the given response to have status code OK (200)
func Status ¶
func Status(t *testing.T, expected int, rr *httptest.ResponseRecorder)
Status expects the given status codes to match
func StringBody ¶
func StringBody(t *testing.T, expected string, rr *httptest.ResponseRecorder)
StringBody expect the response body to match the given string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.