diff --git a/Cargo.toml b/Cargo.toml index 2f69c7ef1..2f50b210a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ path = "src/lib.rs" [workspace] members = [ ".", - "session", + "actix-session", "staticfiles", ] diff --git a/session/Cargo.toml b/actix-session/Cargo.toml similarity index 100% rename from session/Cargo.toml rename to actix-session/Cargo.toml diff --git a/session/src/cookie.rs b/actix-session/src/cookie.rs similarity index 100% rename from session/src/cookie.rs rename to actix-session/src/cookie.rs diff --git a/session/src/lib.rs b/actix-session/src/lib.rs similarity index 100% rename from session/src/lib.rs rename to actix-session/src/lib.rs diff --git a/src/test.rs b/src/test.rs index 8b6667a4d..8495ea89c 100644 --- a/src/test.rs +++ b/src/test.rs @@ -42,16 +42,20 @@ where /// service. /// /// ```rust -/// use actix_http::http::{test, App, HttpResponse}; +/// use actix_web::{test, App, HttpResponse, http::StatusCode}; +/// use actix_service::Service; /// /// fn main() { -/// let app = test::init_service( +/// let mut app = test::init_service( /// App::new() /// .resource("/test", |r| r.to(|| HttpResponse::Ok())) -/// ) +/// ); /// -/// let req = TestRequest::with_uri("/test").to_request(); -/// let resp = block_on(srv.call(req)).unwrap(); +/// // Create request object +/// let req = test::TestRequest::with_uri("/test").to_request(); +/// +/// // Execute application +/// let resp = test::block_on(app.call(req)).unwrap(); /// assert_eq!(resp.status(), StatusCode::OK); /// } /// ```