test

package
v0.0.0-...-43633ff Latest Latest
Warning

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

Go to latest
Published: May 16, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSONAPIRequest

func JSONAPIRequest(db *pg.DB, method, route string, jsonData *strings.Reader) *httptest.ResponseRecorder

JSONAPIRequest is a helper for running controller tests

func JSONAPISetup

func JSONAPISetup() (*pg.DB, *controller.Handler, *migrate.Migrate)

JSONAPISetup is a helper for setting up controller tests

func JSONAPITeardown

func JSONAPITeardown(db *pg.DB, m *migrate.Migrate)

JSONAPITeardown is a helper for tearing down controller tests

func JSONExpectResponseToEqual

func JSONExpectResponseToEqual(recorder *httptest.ResponseRecorder, codeExpected int, JSONExpected string)

JSONExpectResponseToEqual inspects and validated the JSON response

Types

This section is empty.

Jump to

Keyboard shortcuts

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