onyx

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2018 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectPanic

func DetectPanic(t *testing.T, templateName string)

Detect if rendering template caused a panic. This function should be invoked with keyword `defer`

func EqualToFile

func EqualToFile(str string, filePath string) bool

Compares a string with the contents of the specified file.

func Handle

func Handle(req *http.Request, h http.HandlerFunc, t *testing.T)

Check to see if handler returns code 200 response

func Header(req *http.Request, key, val string)

Sets a header value for supplied http request.

func NewRequest

func NewRequest(method, path string) (*http.Request, error)

Create a new http request with the supplied parameters.

func NewRequestWithBody

func NewRequestWithBody(method, path, body string) (*http.Request, error)

Create a new http request, with a request body, with the supplied parameters.

Types

This section is empty.

Jump to

Keyboard shortcuts

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