Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONModelToBytesJSON ¶
JSONModelToBytesJSON - preforms model -> bytes.Reader(implements io.Reader). useful for passing payload to http request in tests
Example: ``` fakeUpdEmailReq := helpers.GetUpdateEmailRequestModel() payload, _ := helpers.JSONModelToBytesJSON(fakeUpdEmailReq) ctx.Request, _ = http.NewRequest(
"POST", "/api/v1/credentials-api/update_email", payload,
) ```
func NewTestHTTPRequest ¶
NewTestHTTPRequest is a HTTP request builder for testing purposes
func ServeTestRequest ¶
func ServeTestRequest( req *http.Request, resp http.ResponseWriter, r *gin.Engine, ctrl apiv1.Controller, )
ServeTestRequest creates HTTP handler for controller
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.