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]
|
||||
members = [
|
||||
".",
|
||||
"session",
|
||||
"actix-session",
|
||||
"staticfiles",
|
||||
]
|
||||
|
||||
|
14
src/test.rs
14
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);
|
||||
/// }
|
||||
/// ```
|
||||
|
Loading…
Reference in New Issue
Block a user