testdb

package
v0.0.0-...-7c2803f Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	*database.TenDatabase
	// contains filtered or unexported fields
}

Database is the wrapper for the gorm database with sleek helper methods.

func NewDB

func NewDB(t *testing.T) *Database

NewDB creates a new test db instance.

func (*Database) NewUser

func (d *Database) NewUser(name string) *model.User

NewUser creates a user and returns the user.

func (*Database) NewUserWithName

func (d *Database) NewUserWithName(name string) *model.User

NewUserWithName creates a user with a name and returns the user.

Jump to

Keyboard shortcuts

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