test

package
v0.17.3 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExpectResponse

type ExpectResponse struct {
	Status  expect.Val
	BodyStr expect.Val
}

type Response

type Response struct {
	Expect ExpectResponse
}

type TC

type TC struct {
	// contains filtered or unexported fields
}

func New

func New(t *testing.T, handler http.Handler) *TC

func (*TC) C added in v0.12.0

func (tc *TC) C() (string, *http.Client, func(method, url string, body io.Reader) (*http.Request, error))

func (*TC) Client added in v0.12.0

func (tc *TC) Client() *http.Client

func (*TC) Close

func (tc *TC) Close()

func (*TC) Factory added in v0.12.0

func (tc *TC) Factory() func(method, url string, body io.Reader) (*http.Request, error)

func (*TC) Get

func (tc *TC) Get(url string, body interface{}) Response

func (*TC) Post added in v0.12.0

func (tc *TC) Post(url string, body interface{}) Response

func (*TC) URL added in v0.12.0

func (tc *TC) URL() string

Jump to

Keyboard shortcuts

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