Expand description
Test utilities for Ravel applications.
Provides helpers for HTTP and application-level testing:
TestClient— send requests to your Axum router without a running serverassert_status/assert_see/assert_json— response assertions
§Usage
ⓘ
use ravel_test::TestClient;
let app = my_ravel_app();
let client = TestClient::new(app);
let resp = client.get("/").await;
assert_eq!(resp.status(), 200);
assert!(resp.text().contains("Hello"));Structs§
- Test
Client - A test client for sending HTTP requests to an Axum
Router. - Test
Response - Wrapper around an Axum
Responsewith convenience assertions.