test

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2019 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyTestFile

func CopyTestFile(t *testing.T, dstDir, dstPrefix, src string) string

CopyTestFile copies the contents of a designated file to a temporary file and returns the filepath of the temporary file for cleanup. This function does NOT clean up created temporary files. Borrows from: https://opensource.com/article/18/6/copying-files-go

func NewContext

func NewContext(t *testing.T, method string, query string, r io.Reader, ctype string) (echo.Context, *httptest.ResponseRecorder)

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

func NewGenerator

func NewGenerator() token.Generator

NewGenerator returns a mock token generator.

func TruncateTables

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

TruncateTables truncates all 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
y or Y : Canonical URL