testutils

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EngineMock

type EngineMock struct {
	InitCalled     bool
	RenderCalled   bool
	RenderCallArgs *EngineMockRenderCallArgs
}

func (*EngineMock) Init

func (e *EngineMock) Init() error

func (*EngineMock) Render

func (e *EngineMock) Render(w http.ResponseWriter, status int, template string, data *sync.Map) error

type EngineMockRenderCallArgs

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

type ResponseMock

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

func NewResponseMock

func NewResponseMock(t *testing.T) *ResponseMock

func (*ResponseMock) Assert

func (r *ResponseMock) Assert(status int, body string)

func (*ResponseMock) Header

func (r *ResponseMock) Header() http.Header

func (*ResponseMock) Write

func (r *ResponseMock) Write(body []byte) (int, error)

func (*ResponseMock) WriteHeader

func (r *ResponseMock) WriteHeader(status int)

Jump to

Keyboard shortcuts

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