Documentation
¶
Overview ¶
internal/testutil/testutil.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONResponse ¶
func JSONResponse(w http.ResponseWriter, status int, body string)
JSONResponse is a helper to write JSON responses in tests.
func NewMockServer ¶
NewMockServer creates a test HTTP server with the given handler. The server is automatically closed when the test completes.
func NewMockServerWithRoutes ¶
NewMockServerWithRoutes creates a test server with multiple route handlers.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.