tdutils

package
v0.0.0-...-86833b7 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPTester

type HTTPTester struct {
	T testing.TB
	A http.Handler
}

func NewHTTPTester

func NewHTTPTester(t testing.TB, a http.Handler) HTTPTester

func (HTTPTester) GetRequest

func (appt HTTPTester) GetRequest(urlStr string) *Response

func (*HTTPTester) Request

func (appt *HTTPTester) Request(r *http.Request) *Response

type Response

type Response struct {
	T testing.TB
	httptest.ResponseRecorder
}

func (*Response) Expect

func (r *Response) Expect(cond bool, errStr string, v ...interface{}) *Response

func (*Response) ExpectOutput

func (r *Response) ExpectOutput(output, errStr string, v ...interface{}) *Response

func (*Response) ExpectOutputContains

func (r *Response) ExpectOutputContains(output, errStr string, v ...interface{}) *Response

func (*Response) ExpectRedirect

func (r *Response) ExpectRedirect(urlStr, errStr string, v ...interface{}) *Response

func (*Response) ExpectStatus

func (r *Response) ExpectStatus(status int, errStr string, v ...interface{}) *Response

func (*Response) String

func (result *Response) String() string

Jump to

Keyboard shortcuts

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