tests

package
v0.0.0-...-df959dd Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertHTTPErrorCode

func AssertHTTPErrorCode(t *testing.T, err error, code int)

AssertHTTPErrorCode asserts an HTTP status code on a given Echo HTTP error

func CreateUser

func CreateUser(orm *ent.Client) (*ent.User, error)

CreateUser creates a random user entity

func ExecuteMiddleware

func ExecuteMiddleware(ctx echo.Context, mw echo.MiddlewareFunc) error

ExecuteMiddleware executes a middleware function on a given Echo context

func InitSession

func InitSession(ctx echo.Context)

InitSession initializes a session for a given Echo context

func NewContext

func NewContext(e *echo.Echo, url string) (echo.Context, *httptest.ResponseRecorder)

NewContext creates a new Echo context for tests using an HTTP test request and response recorder

Types

This section is empty.

Jump to

Keyboard shortcuts

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