mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-27 17:22:57 +01:00
move session to different folder
This commit is contained in:
parent
143ef87b66
commit
0cf73f1a04
@ -27,7 +27,7 @@ path = "src/lib.rs"
|
|||||||
[workspace]
|
[workspace]
|
||||||
members = [
|
members = [
|
||||||
".",
|
".",
|
||||||
"session",
|
"actix-session",
|
||||||
"staticfiles",
|
"staticfiles",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
14
src/test.rs
14
src/test.rs
@ -42,16 +42,20 @@ where
|
|||||||
/// service.
|
/// service.
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// use actix_http::http::{test, App, HttpResponse};
|
/// use actix_web::{test, App, HttpResponse, http::StatusCode};
|
||||||
|
/// use actix_service::Service;
|
||||||
///
|
///
|
||||||
/// fn main() {
|
/// fn main() {
|
||||||
/// let app = test::init_service(
|
/// let mut app = test::init_service(
|
||||||
/// App::new()
|
/// App::new()
|
||||||
/// .resource("/test", |r| r.to(|| HttpResponse::Ok()))
|
/// .resource("/test", |r| r.to(|| HttpResponse::Ok()))
|
||||||
/// )
|
/// );
|
||||||
///
|
///
|
||||||
/// let req = TestRequest::with_uri("/test").to_request();
|
/// // Create request object
|
||||||
/// let resp = block_on(srv.call(req)).unwrap();
|
/// 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);
|
/// assert_eq!(resp.status(), StatusCode::OK);
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
Loading…
Reference in New Issue
Block a user