1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! Test utilities for Rusty Gasket applications.
//!
//! Provides [`TestApp`] for building a test harness around your axum router
//! without starting a real HTTP server, [`TestResponse`] for ergonomic
//! response assertions, and [`MockAuthBackend`] for testing authenticated
//! endpoints without real JWT/OIDC infrastructure.
//!
//! # Example
//!
//! ```ignore
//! use rusty_gasket::testing::{TestApp, MockAuthBackend};
//!
//! let app = TestApp::builder()
//! .mock_auth("test-user")
//! .router(my_router)
//! .build();
//!
//! let resp = app.get("/healthcheck").await;
//! assert_eq!(resp.status(), 200);
//! assert_eq!(resp.json::<serde_json::Value>()["status"], "ok");
//! ```
pub use MockAuthBackend;
pub use BoxError;
pub use TestApp;
pub use TestResponse;
/// Re-exports of the most commonly used testing types.
///
/// `use rusty_gasket::testing::prelude::*` to set up an in-process
/// HTTP test in one import.