validation

package
v1.0.84 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fixture

func Fixture(t *testing.T, filename string) []byte

func IndentJSON

func IndentJSON(t *testing.T, buf []byte) []byte

func JsonAPIResponseBody

func JsonAPIResponseBody(t *testing.T, v interface{}) []byte

func JsonBody

func JsonBody(t *testing.T, v interface{}) []byte

func RunTest

func RunTest(t *testing.T, test *EndpointTest)

func RunTests

func RunTests(t *testing.T, tests []*EndpointTest)

Types

type EndpointTest

type EndpointTest struct {
	Name         string
	ExpectedVerb string
	ExpectedPath string
	ExpectedBody []byte
	StatusCode   int
	ResponseBody []byte
	Fn           func(*testing.T, rest.Client)
}

Jump to

Keyboard shortcuts

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