Versions in this module Expand all Collapse all v0 v0.0.1 Oct 3, 2023 Changes in this version + func NewJSONRequest(ctx context.Context, method, url string, body interface{}) (*http.Request, error) + func NewQueryRequest(ctx context.Context, method, url string, queries types.Map) (*http.Request, error) + func NewUploadRequest(ctx context.Context, url string, file []byte, fields map[string]string) (*http.Request, error) + func SendRequest(r *http.Request) (*http.Response, error) + type InternalBody struct + Data R + Message string + Time time.Time + Verdict string + type Response struct + Body Body + StatusCode int + func ExecuteTestCase(t *testing.T, tc *TestCase, engine *gin.Engine) *Response[InternalBody[Body]] + func Get(ctx context.Context, url string) (*Response[Body], error) + func ParseResponse(ctx context.Context, r *http.Response) (*Response[R], error) + func PostJSON(ctx context.Context, url string, body interface{}) (*Response[Body], error) + type ResponseRecorder struct + func NewResponseRecorder() *ResponseRecorder + func (r *ResponseRecorder) CloseNotify() <-chan bool + type TestCase struct + AuthToken string + ExpectHeaders types.Map + ExpectStatus int + ExpectVerdict string + FilePath string + Headers types.Map + Method string + Name string + Params types.Map + Path string + func NewTestCase(name string, method string, path string, params types.Map, expectStatus int, ...) *TestCase