Documentation
¶
Overview ¶
Package testutil holds test-only helpers shared across the other internal packages. Most notably RewriteTransport, which rewrites outbound HTTP requests to a local httptest.Server so tests can stub Spotify API responses without hitting the real endpoint.
Import this package only from _test.go files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RewriteTransport ¶
type RewriteTransport struct {
Base http.RoundTripper
Target string
}
RewriteTransport redirects all requests to a test server URL.
Click to show internal directories.
Click to hide internal directories.