test

package
Version: v1.27.5-0...-15024a1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterRoutes

func FilterRoutes(routes []*echo.Route) []string

FilterRoutes takes in a slice of Echo routes and returns a slice of strings with handler routes.

func NewContext

func NewContext(t *testing.T, payload []byte) (echo.Context, *httptest.ResponseRecorder)

NewContext returns a new echo.Context, and *httptest.ResponseRecorder to be used for tests.

func SerializeStruct

func SerializeStruct(t *testing.T, i interface{}) []byte

SerializeStruct takes in an interface that is converted into a []byte to be used as a payload for requests.

func TruncateTables

func TruncateTables(t *testing.T, db *pg.DB)

TruncateTables truncates many of the tables in the database to be able to start from scratch for a test.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto