Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertError ¶
func AssertError(t *testing.T, resp *httptest.ResponseRecorder) (err error)
AssertError will assert error
Example ¶
t := &testing.T{} recorder := httptest.NewRecorder() request, err := http.NewRequest("POST", "http://here.com/v1/signin", nil) if err != nil { panic(err) } response.InternalServerError(request, recorder, errors.New("Failed to do something")) AssertError(t, recorder)
Output:
func AssertErrorMessage ¶
AssertErrorMessage will assert error message
Example ¶
t := &testing.T{} recorder := httptest.NewRecorder() request, err := http.NewRequest("POST", "http://here.com/v1/signin", nil) if err != nil { panic(err) } response.InternalServerError(request, recorder, errors.New("Failed to do something")) AssertErrorMessage(t, recorder, "Failed to do something")
Output:
func AssertStatusEqual ¶
func AssertStatusEqual(t *testing.T, resp *httptest.ResponseRecorder, status int)
AssertStatusEqual will assert equal status
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.