Documentation
¶
Index ¶
- Constants
- type HTTPcode
- type HTTPerror
- type Method
- type Path
- type Request
- func Append(r ...[]Request) []Request
- func RequestsAuth() []Request
- func RequestsDelete(urlPath Path, expected any) []Request
- func RequestsDeleteResponse(urlPath Path, expected any, response []byte) []Request
- func RequestsError(url Path, method Method, Code HTTPcode, amount uint) []Request
- func RequestsErrorHandled(url Path, method Method, err HTTPerror) []Request
- func RequestsGetJson(urlPath Path, v any) []Request
- func RequestsPost(urlPath Path, expected any) []Request
- func RequestsPostResponse(urlPath Path, expected any, response []byte) []Request
- func RequestsPut(urlPath Path, expected any) []Request
- func RequestsPutHandler(urlPath Path, handler func(t *testing.T, v url.Values)) []Request
- func RequestsVersion(version string) []Request
- type Server
Constants ¶
View Source
const InternalServerError string = "500 Internal Server Error"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct {
Method Method
Path Path
HandlerFunc func(w http.ResponseWriter, r *http.Request, t *testing.T)
}
func RequestsAuth ¶
func RequestsAuth() []Request
func RequestsDelete ¶
func RequestsDeleteResponse ¶
func RequestsError ¶
func RequestsErrorHandled ¶
func RequestsGetJson ¶
func RequestsPost ¶
RequestsPost creates a request that expects a POST with JSON body matching 'expected' all values in 'expected' will be treated as strings or arrays of strings.
func RequestsPostResponse ¶
func RequestsPut ¶
RequestsPut creates a request that expects a PUT with JSON body matching 'expected' all values in 'expected' will be treated as strings or arrays of strings.
func RequestsPutHandler ¶
func RequestsVersion ¶
Click to show internal directories.
Click to hide internal directories.