quickapitest

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeResponse

func DecodeResponse[T any](
	t *testing.T,
	method string,
	path string,
	res *http.Response,
	code int,
) T

DecodeResponse decodes json response

func DoRequest

func DoRequest[T any](
	t *testing.T,
	req *http.Request,
	code int,
	handler http.Handler,
	options ...func(*testing.T, *http.Response),
) T

DoRequest requests and decode response

func NewContext

func NewContext(t *testing.T) context.Context

Types

type TestLogger

type TestLogger struct {
	T *testing.T
}

func (*TestLogger) Printf

func (l *TestLogger) Printf(format string, v ...any)

Jump to

Keyboard shortcuts

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