Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestApplication ¶
type TestApplication struct {
*simba.Application
Server *httptest.Server
}
TestApplication represents a test application with additional testing utilities
func Default ¶ added in v0.10.0
func Default(opts ...settings.Option) *TestApplication
Default creates a new test application with default settings
func New ¶
func New(opts ...settings.Option) *TestApplication
New creates a new test application with the given settings
func (*TestApplication) Client ¶
func (a *TestApplication) Client() *http.Client
Client returns an HTTP client configured to work with the test server
func (*TestApplication) RunTest ¶
func (a *TestApplication) RunTest(fn func())
RunTest runs a test function with a started test server and handles cleanup
func (*TestApplication) URL ¶
func (a *TestApplication) URL() string
URL returns the base URL of the test server
Click to show internal directories.
Click to hide internal directories.