ventures

package
v0.0.0-...-4670381 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertGenericReply

func AssertGenericReply(t *testing.T, body io.Reader)

AssertGenericReply asserts that the response 'body' contains a generic reply.

func AssertHeaders

func AssertHeaders(t *testing.T, h http.Header)

AssertHeaders asserts that the expected headers in 'h' have been supplied.

func CloseDatabase

func CloseDatabase()

CloseDatabase closes the test database.

func DBInjectDead

func DBInjectDead()

DBInjectDead injects a default set of dead Ventures into the database

func DBInjectLiving

func DBInjectLiving()

DBInjectLiving injects a default set of living Ventures into the database

func DBQueryAll

func DBQueryAll() []ventures.Venture

DBQueryAll queries the database for all living ventures

func DBQueryFirst

func DBQueryFirst() *ventures.Venture

DBQueryFirst queries the database for the first Venture encountered

func DBQueryMany

func DBQueryMany(ids string) []ventures.Venture

DBQueryMany queries the database for Ventures with the specified IDs

func DBQueryOne

func DBQueryOne(id string) ventures.Venture

DBQueryOne queries the database for a specific Venture

func Inject

func Inject(new ventures.NewVenture) *ventures.Venture

Inject injects a Venture into the database.

func InjectAll

func InjectAll(new []ventures.NewVenture) []ventures.Venture

InjectAll injects a slice of Ventures into the database.

func ResetDatabase

func ResetDatabase()

ResetDatabase will reset the database by closing and deleting it then creating a new one.

func SetupEmptyTest

func SetupEmptyTest()

SetupEmptyTest is run at the start of a test to setup the server but does not inject any test data.

func SetupTest

func SetupTest()

SetupTest is run at the start of every test to setup the server and inject the test data.

func TearDown

func TearDown()

TearDown should be deferred straight after SetupTest() is run to close resources at the end of every test.

Types

This section is empty.

Jump to

Keyboard shortcuts

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