testutil

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertHasElement

func AssertHasElement(tb testing.TB, body []byte, tag string, attrs map[string]string)

AssertHasElement fails the test if no element matching the basic tag/attribute criteria is found. This is a simplified structural check for the MVP without a full CSS selector engine.

func AssertText

func AssertText(tb testing.TB, body []byte, tag string, attrs map[string]string, expected string)

AssertText fails if the text content of the first element matching tag/attrs != expected.

func NewTestWebServer

func NewTestWebServer(tb testing.TB, authHandler http.Handler, dashboardHandler http.Handler) *httptest.Server

NewTestWebServer returns a httptest.Server configured with the project's standard middleware stack and routing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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