testing

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeRequest

func MakeRequest(e *echo.Echo, config *RequestConfig) (echo.Context, *httptest.ResponseRecorder)

func PrintResponse

func PrintResponse(t *testing.T, res *httptest.ResponseRecorder)

func TestFields

func TestFields(t *testing.T, doc interface{})

Types

type RequestConfig

type RequestConfig struct {
	// Default GET
	Method string
	// Default "/"
	Target string

	Path           string
	PathParamName  string
	PathParamValue string

	HeaderAuthorization string
	Body                interface{}
}

Jump to

Keyboard shortcuts

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