testutil

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertError

func AssertError(t *testing.T, output []byte, expectedCode string)

AssertError asserts the envelope has ok: false with the expected error code.

func AssertSuccess

func AssertSuccess(t *testing.T, output []byte) any

AssertSuccess asserts the envelope has ok: true and returns the data field.

func MockCredentialStore

func MockCredentialStore() *credentials.MemoryStore

MockCredentialStore returns a MemoryStore for use in tests. This is a convenience alias — tests should use credentials.NewMemoryStore() directly.

func NewTrelloServer

func NewTrelloServer(t *testing.T, routes map[string]http.HandlerFunc) *httptest.Server

NewTrelloServer creates a test HTTP server with configurable route handlers. Routes are keyed by "METHOD /path" (e.g., "GET /1/members/me").

func ParseEnvelope

func ParseEnvelope(t *testing.T, output []byte) map[string]any

ParseEnvelope parses JSON output into a map. Fails the test if invalid.

Types

This section is empty.

Jump to

Keyboard shortcuts

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