예제 #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)
}