document main test module

This commit is contained in:
Rob Ede 2021-12-14 23:37:24 +00:00
parent 4eebbcf5fb
commit f934afd17b
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
1 changed files with 22 additions and 1 deletions

View File

@ -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)]