Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MockClient ¶
func MockClient( t *testing.T, fixture ResponseData, output *RequestData, callback HTTPHandler) (*platform.Client, *httptest.Server)
MockClient returns a client to mock HTTP requests with a callback function
Types ¶
type HTTPHandler ¶
type HTTPHandler func(w http.ResponseWriter, r *http.Request)
HTTPHandler type defines callback from doing a mock HTTP request
type RequestData ¶
RequestData holds test HTTP request data
type ResponseData ¶ added in v1.0.0
func Fixture ¶
func Fixture(path string, statusCode int) ResponseData
Fixture loads a fixture file to a string
Click to show internal directories.
Click to hide internal directories.