Documentation
¶
Index ¶
- func MockApiRequestWithAuth(t *testing.T, body, method, url string, handler RouteHandler, token string) *httptest.ResponseRecorder
- func MockFormRequest(t *testing.T, formData map[string]string, method, uri string, ...) *httptest.ResponseRecorder
- func MockJSONRequest(t *testing.T, body, method, url string, handler RouteHandler) []byte
- func WithConfigOverride(t *testing.T, override func())
- func WithTestDB(t *testing.T)
- type RouteHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MockApiRequestWithAuth ¶
func MockApiRequestWithAuth(t *testing.T, body, method, url string, handler RouteHandler, token string) *httptest.ResponseRecorder
func MockFormRequest ¶
func MockFormRequest(t *testing.T, formData map[string]string, method, uri string, handler RouteHandler) *httptest.ResponseRecorder
func MockJSONRequest ¶
func MockJSONRequest(t *testing.T, body, method, url string, handler RouteHandler) []byte
func WithConfigOverride ¶
func WithTestDB ¶
Types ¶
type RouteHandler ¶
type RouteHandler func(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.