示例#1
0
func callHandlerList(t *testing.T) *httptest.ResponseRecorder {
	ri := &testhelpers.RequestInfo{
		Test:     t,
		Endpoint: articles.Endpoints[articles.EndpointList],
		URI:      "/blog/articles/",
	}

	return testhelpers.NewRequest(ri)
}
示例#2
0
func callHandlerAdd(t *testing.T, params *articles.HandlerAddParams) *httptest.ResponseRecorder {
	ri := &testhelpers.RequestInfo{
		Test:     t,
		Endpoint: articles.Endpoints[articles.EndpointAdd],
		URI:      "/blog/articles/",
		Params:   params,
	}

	return testhelpers.NewRequest(ri)
}