rootertest

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Test

func Test(t *testing.T, handler http.Handler, testCases []TestCase)

Test all the provided test cases

Types

type TestCase

type TestCase struct {
	Name          string
	URL           string
	StatusCode    int
	ResponseBytes []byte
	Checker       func(response *http.Response)
}

TestCase to be tested

Jump to

Keyboard shortcuts

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