testing

package
v0.13.8-rc.2 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitForStatus

func WaitForStatus(url string, status int, timeout time.Duration) error

Types

type BaseTest

type BaseTest struct {
	Name           string
	Method         string
	RequestHeaders map[string]string
	URL            string
	Body           string
}

type Counter

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

func App

func App(t *testing.T) (*pocketbase.PocketBase, *Counter, func())

func NewCounter

func NewCounter() *Counter

func (*Counter) Count

func (c *Counter) Count(name string) int

func (*Counter) Increment

func (c *Counter) Increment(name string)

type RecordingServer

type RecordingServer struct {
	Entries []string
	// contains filtered or unexported fields
}

func NewRecordingServer

func NewRecordingServer() *RecordingServer

func (*RecordingServer) ServeHTTP

func (s *RecordingServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

type UserTest

type UserTest struct {
	Name               string
	AuthRecord         string
	Admin              string
	ExpectedStatus     int
	ExpectedContent    []string
	NotExpectedContent []string
	ExpectedEvents     map[string]int
}

Jump to

Keyboard shortcuts

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