testutil

package
v0.0.0-...-3d95c69 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActualResponse

func ActualResponse(t *testing.T, router *gin.Engine,
	method, url string, body io.Reader) *http.Response

ActualResponse return recorded response

func JSONStringFromInterface

func JSONStringFromInterface(t *testing.T, res interface{}) string

JSONStringFromInterface return json string by interface.

func JSONStringFromResBody

func JSONStringFromResBody(t *testing.T, body io.Reader) string

JSONStringFromResBody return json string by http response body

func ReqBodyFromInterface

func ReqBodyFromInterface(t *testing.T, body interface{}) *bytes.Buffer

ReqBodyFromInterface return request body that contain json payload.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL