testutil

package
v0.0.0-...-2ec3dcb Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FreezeTime

func FreezeTime()

func TruncateTables

func TruncateTables()

Types

type ClientState

type ClientState struct {
	User      *auth.User
	Session   *auth.Session
	Workspace *auth.Workspace
	// contains filtered or unexported fields
}

func NewClientState

func NewClientState() *ClientState

func NewClientStateWithUser

func NewClientStateWithUser(t *testing.T) *ClientState

func NewClientStateWithUserEmail

func NewClientStateWithUserEmail(t *testing.T, email string) *ClientState

func (*ClientState) Delete

func (c *ClientState) Delete(path string) (*httptest.ResponseRecorder, error)

func (*ClientState) Get

func (*ClientState) Patch

func (c *ClientState) Patch(path string, body any) (*httptest.ResponseRecorder, error)

func (*ClientState) Post

func (c *ClientState) Post(path string, body any) (*httptest.ResponseRecorder, error)

func (*ClientState) Put

func (c *ClientState) Put(path string, body any) (*httptest.ResponseRecorder, error)

type TestApp

type TestApp struct {
	Stop func() error
}

func StartTestApp

func StartTestApp() (*TestApp, error)

Jump to

Keyboard shortcuts

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