Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // GoodParams represent some good tinygraphs parameters to test. GoodParams []map[string]string // BadParams represent some bad, wrong parameters to test. BadParams []map[string]string )
Functions ¶
This section is empty.
Types ¶
type HandlerFunc ¶
type HandlerFunc func(url, method string, params map[string]string, r *route.Router) *httptest.ResponseRecorder
HandlerFunc type returns an httptest.ResponseRecorder when you pass the following params: url: the url you want to query. params: the parameters that the url should use. r: the router to record the httptest.ResponseRecorder.
func GenerateHandlerFunc ¶
func GenerateHandlerFunc(t *testing.T, handler func(http.ResponseWriter, *http.Request)) HandlerFunc
GenerateHandlerFunc returns a HandlerFunc type based on the handler passed as argument.
Click to show internal directories.
Click to hide internal directories.