From 0cf73f1a04d23995bffd8db21f00107713baf209 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Tue, 5 Mar 2019 18:52:29 -0800 Subject: [PATCH] move session to different folder --- Cargo.toml | 2 +- {session => actix-session}/Cargo.toml | 0 {session => actix-session}/src/cookie.rs | 0 {session => actix-session}/src/lib.rs | 0 src/test.rs | 14 +++++++++----- 5 files changed, 10 insertions(+), 6 deletions(-) rename {session => actix-session}/Cargo.toml (100%) rename {session => actix-session}/src/cookie.rs (100%) rename {session => actix-session}/src/lib.rs (100%) 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); /// } /// ```