From f934afd17ba18fb9976f5b19d93d5a213c620d3f Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Tue, 14 Dec 2021 23:37:24 +0000 Subject: [PATCH] document main test module --- src/test/mod.rs | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/test/mod.rs b/src/test/mod.rs index 973d8827c..a29dfc437 100644 --- a/src/test/mod.rs +++ b/src/test/mod.rs @@ -1,4 +1,23 @@ //! Various helpers for Actix applications to use during testing. +//! +//! # Creating A Test Service +//! - [`init_service`] +//! +//! # Off-The-Shelf Test Services +//! - [`ok_service`] +//! - [`simple_service`] +//! +//! # Calling Test Service +//! - [`TestRequest`] +//! - [`call_service`] +//! - [`call_and_read_body`] +//! - [`call_and_read_body_json`] +//! +//! # Reading Response Payloads +//! - [`read_body`] +//! - [`read_body_json`] + +// TODO: more docs on generally how testing works with these parts pub use actix_http::test::TestBuffer; @@ -9,8 +28,10 @@ mod test_utils; pub use self::test_request::TestRequest; #[allow(deprecated)] pub use self::test_services::{default_service, ok_service, simple_service}; +#[allow(deprecated)] pub use self::test_utils::{ - call_service, init_service, read_body, read_body_json, read_response, read_response_json, + call_and_read_body, call_and_read_body_json, call_service, init_service, read_body, + read_body_json, read_response, read_response_json, }; #[cfg(test)]