testutil

package
v0.0.0-...-13db65c Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseTestApp

func CloseTestApp(t *testing.T)

func DoRequest

func DoRequest(method string, apiPath string, body io.Reader, accessToken string) (error, *http.Response)

func FindMyRootDir

func FindMyRootDir() string

func InitTestDatabase

func InitTestDatabase(t *testing.T) *bun.DB

func InitTestFramework

func InitTestFramework()

func ReadBody

func ReadBody(t *testing.T, resp *http.Response) string

Types

type ApplicationTestContext

type ApplicationTestContext struct {
	Db                   *bun.DB
	App                  *fiber.App
	TestAdminUser        *model.User
	TestAdminAccessToken string
}

func InitTestApp

func InitTestApp(t *testing.T) *ApplicationTestContext

Jump to

Keyboard shortcuts

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