Skip to main content

Crate capy_testing

Crate capy_testing 

Source
Expand description

Integration tests against an Axum service, without TCP or background servers.

Structs§

FactoryBuilder
A factory and its explicit database/transaction. Own field defaults in application code.
SessionRequest
A session request borrowing the cookie jar until its response is received.
TestApp
An in-process application using the normal factory, isolated data and real middleware. Prefer TestApp::boot(application()); new(router) remains the low-level adapter.
TestAppBuilder
Test setup using the real application factory’s App value.
TestRequest
A fluent request builder used only in tests; invalid requests panic clearly.
TestResponse
A fully buffered test response with chainable assertions.
TestSession
An independent single-origin HTTP session using real auth and CSRF routes. Cookies honor origin, path, expiry and Secure; this is not a full browser or CORS emulator. Secrets are never included in this type’s Debug output.

Enums§

TestDatabase
Databases provisioned by the test harness. No application database URL is used implicitly.

Traits§

Factory
An application-owned record builder. Implement with native SeaORM operations. Passing a borrowed connection permits both a pool and an existing transaction.
TestApplication
Adapter implemented by Capy’s normal App builder, not a separate test router.