Documentation ¶
Overview ¶
Package fakehttp provides a fake response writer for use in tests. Further http package mocks will probably not be created, as I'm sure there's a more complete http mock library out there.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResponseWriter ¶
The ResponseWriter adheres to the http.ResposeWriter interface in a minimal way to support easier testing
func NewResponseWriter ¶
func NewResponseWriter() *ResponseWriter
NewResponseWriter returns a ResponseWriter with a default status code of -1
func (*ResponseWriter) Header ¶
func (rw *ResponseWriter) Header() http.Header
Header returns the http.Header data for http.ResponseWriter compatibility
func (*ResponseWriter) Write ¶
func (rw *ResponseWriter) Write(b []byte) (int, error)
Write stores the given output for later testing
func (*ResponseWriter) WriteHeader ¶
func (rw *ResponseWriter) WriteHeader(s int)
WriteHeader sets up StatusCode for later testing
Click to show internal directories.
Click to hide internal directories.