check

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Header(t testing.TInterface, expect http.Header, actual http.Header)

Header checks if the expected http.Header are contained in actual.

func JSON

func JSON(t testing.TInterface, expect interface{}, actualReader io.ReadCloser)

JSON checks if body contains the JSON data matching the passed expected value.

func Multipart

func Multipart(
	t testing.TInterface, body io.ReadCloser, h http.Header, expectJSON interface{}, expectFiles []sendpart.File,
)

Multipart checks if the body contains multipart data including the passed files and optionally the passed JSON data.

func Query

func Query(t testing.TInterface, expect url.Values, actual url.Values)

Query checks if the passed query contains the values found in except.

func WriteJSON

func WriteJSON(t testing.TInterface, w http.ResponseWriter, v interface{})

WriteJSON writes the passed value to the passed http.ResponseWriter.

Types

This section is empty.

Jump to

Keyboard shortcuts

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