tests

package
v0.0.0-...-9d742bf Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertContentTypeHeaderEquals

func AssertContentTypeHeaderEquals(t *testing.T, response *httptest.ResponseRecorder, want string)

AssertContentTypeHeaderEquals verifies that the response's Content-Type header matches expectation

func AssertError

func AssertError(t *testing.T, err error)

AssertError verifies that the error is not nil

func AssertLocationHeaderEquals

func AssertLocationHeaderEquals(t *testing.T, response *httptest.ResponseRecorder, want string)

AssertLocationHeaderEquals verifies that the response's Location header matches expectation

func AssertNoError

func AssertNoError(t *testing.T, err error)

AssertNoError verifies that the error is nil

func AssertStatusEquals

func AssertStatusEquals(t *testing.T, got, want int)

AssertStatusEquals verifies that the request status code matches expectation

func NewAuthenticatedGetRequest

func NewAuthenticatedGetRequest(t *testing.T, url string) *http.Request

NewAuthenticatedGetRequest creates a new GET request to url with a cookie named "id"

func NewGetRequest

func NewGetRequest(t *testing.T, url string) *http.Request

NewGetRequest simplifies creating a new GET request

func NewSessionStoreWithErrorOnDelete

func NewSessionStoreWithErrorOnDelete(t *testing.T) sessionup.Store

NewSessionStoreWithErrorOnDelete creates a new session store that throws on Delete()

func NewStoreWithErrorOnCreate

func NewStoreWithErrorOnCreate(t *testing.T) sessionup.Store

NewStoreWithErrorOnCreate creates a new session store that throws on Create()

func NewValidSessionManager

func NewValidSessionManager(t *testing.T) *sessionup.Manager

NewValidSessionManager creates a new valid session manager with cookie named "id"

func NewValidSessionStore

func NewValidSessionStore(t *testing.T) sessionup.Store

NewValidSessionStore creates a new session store that never throws

Types

This section is empty.

Jump to

Keyboard shortcuts

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