testing

package
v0.0.0-...-fe9eb67 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2015 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupDB

func CleanupDB(t *TestingDB) error

func SetupBolt

func SetupBolt(name string) setupFunc

func SetupBuckets

func SetupBuckets(buckets ...[]db.Bucket) setupFunc

func SetupUpdateErr

func SetupUpdateErr(msg string, vals ...interface{}) setupFunc

func SetupViewErr

func SetupViewErr(msg string, vals ...interface{}) setupFunc

Types

type TestUser

type TestUser struct {
	Email     string
	Pwhash    string
	LoginKey  string
	LoginHash string
}

type TestingDB

type TestingDB struct {
	bolt.DB
	// contains filtered or unexported fields
}

Fulfills db.DB

func NewTestingDB

func NewTestingDB(setup ...setupFunc) (*TestingDB, error)

func (*TestingDB) Update

func (t *TestingDB) Update(fn func(*bolt.Tx) error) error

func (*TestingDB) View

func (t *TestingDB) View(fn func(*bolt.Tx) error) error

Jump to

Keyboard shortcuts

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