Documentation
¶
Index ¶
- type APITest
- type Response
- func (a Response) Cool() Response
- func (a Response) Created() Response
- func (a Response) InternalServerError() Response
- func (a Response) JSON(i interface{}) Response
- func (a Response) NoContent() Response
- func (a Response) NotFound() Response
- func (a Response) OK() Response
- func (a Response) Status(code int) Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APITest ¶
type APITest struct {
// contains filtered or unexported fields
}
APITest is a helper for running a series of API tests. Initialize it once with New (or NewWithGoji) then call `Request` to issue API requests
func NewWithGoji ¶
NewWithGoji instantiates a new API test object with a goji.Mux
type Response ¶
type Response struct { StatusCode int StatusText string Body []byte // contains filtered or unexported fields }
Response contains helper members and methods for working with API tests
func (Response) Cool ¶
Cool checks weather HTTP status code is in the 200s-300s range (i.e. not an error)
func (Response) InternalServerError ¶
InternalServerError is a shortcut for checking for an HTTP 500 response
Click to show internal directories.
Click to hide internal directories.