testbed

package
v0.0.0-...-1d3a159 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtendKeys

func ExtendKeys(a, b gstruct.Keys) gstruct.Keys

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func (Client) Delete

func (c Client) Delete(url string) *httptest.ResponseRecorder

func (Client) Get

func (c Client) Get(url string) *httptest.ResponseRecorder

func (Client) Post

func (c Client) Post(url string, s string) *httptest.ResponseRecorder

func (Client) PostJSON

func (c Client) PostJSON(url string, s string) *httptest.ResponseRecorder

func (Client) PutJSON

func (c Client) PutJSON(url string, s string) *httptest.ResponseRecorder

func (Client) Serve

func (c Client) Serve(req *http.Request) *httptest.ResponseRecorder

func (Client) WithToken

func (c Client) WithToken(userID uint64) Client

type TestApp

type TestApp struct {
	*bunapp.App
}

func StartApp

func StartApp(ctx context.Context) *TestApp

func (*TestApp) Client

func (app *TestApp) Client() Client

func (*TestApp) TruncateDB

func (app *TestApp) TruncateDB(ctx context.Context)

Jump to

Keyboard shortcuts

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