appctxtest

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2018 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppCtxTest

type AppCtxTest struct {
	*servicestest.ServicesTest

	AppCtx   *appctx.Context
	StaticFS filesystem.FS
	// contains filtered or unexported fields
}

AppCtxTest contains an app and all of its dependencies for testing

func SetupTest

func SetupTest(t *testing.T) *AppCtxTest

SetupTest will create a test App

func (*AppCtxTest) Login

func (appCtxTest *AppCtxTest) Login() *models.User

Login will create a test user and future requests will be authenticated as this user

func (*AppCtxTest) Logout

func (appCtxTest *AppCtxTest) Logout()

Logout will logout the currently logged user

Jump to

Keyboard shortcuts

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