assert

package
v0.0.0-...-11af2ba Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Body

func Body(t *testing.T, got *http.Response, want string)

Body asserts body from a response

func BodyEmpty

func BodyEmpty(t *testing.T, got *http.Response)

BodyEmpty asserts response body is empty

func DoRequest

func DoRequest(t *testing.T, handler http.Handler, method, path string, headers http.Header, body io.Reader) *http.Response

DoRequest records a client request for debug/test use

func Error

func Error(t *testing.T, got error, want error)

Error asserts an error

func Header(t *testing.T, resp *http.Response, key, val string)

Header asserts header from a response

func StatusCode

func StatusCode(t *testing.T, got *http.Response, want int)

StatusCode asserts status code from a response

Types

This section is empty.

Jump to

Keyboard shortcuts

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