1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-01-22 23:05:56 +01:00

fix dev dependencies

This commit is contained in:
Nikolay Kim 2019-04-02 15:00:10 -07:00
parent db1f7651a3
commit 4227cddd30
8 changed files with 15 additions and 13 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "actix-web" name = "actix-web"
version = "1.0.0-alpha.3" version = "1.0.0-alpha.2"
authors = ["Nikolay Kim <fafhrd91@gmail.com>"] authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
description = "Actix web is a simple, pragmatic and extremely fast web framework for Rust." description = "Actix web is a simple, pragmatic and extremely fast web framework for Rust."
readme = "README.md" readme = "README.md"

View File

@ -552,7 +552,7 @@ impl<P> FromRequest<P> for PathBufWrp {
type Future = Result<Self, Self::Error>; type Future = Result<Self, Self::Error>;
fn from_request(req: &mut ServiceFromRequest<P>) -> Self::Future { fn from_request(req: &mut ServiceFromRequest<P>) -> Self::Future {
PathBufWrp::get_pathbuf(req.match_info().path()) PathBufWrp::get_pathbuf(req.request().match_info().path())
} }
} }
@ -1049,7 +1049,7 @@ mod tests {
.new_service(&()), .new_service(&()),
) )
.unwrap(); .unwrap();
let req = TestRequest::with_uri("/missing").to_service(); let req = TestRequest::with_uri("/missing").to_srv_request();
let mut resp = test::call_success(&mut st, req); let mut resp = test::call_success(&mut st, req);
assert_eq!(resp.status(), StatusCode::OK); assert_eq!(resp.status(), StatusCode::OK);

View File

@ -1,6 +1,6 @@
[package] [package]
name = "actix-http" name = "actix-http"
version = "0.1.0-alpha.3" version = "0.1.0-alpha.2"
authors = ["Nikolay Kim <fafhrd91@gmail.com>"] authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
description = "Actix http primitives" description = "Actix http primitives"
readme = "README.md" readme = "README.md"

View File

@ -333,6 +333,7 @@ mod tests {
let request = test::TestRequest::get().to_request(); let request = test::TestRequest::get().to_request();
let response = test::block_on(app.call(request)).unwrap(); let response = test::block_on(app.call(request)).unwrap();
assert!(response assert!(response
.response()
.cookies() .cookies()
.find(|c| c.name() == "actix-session") .find(|c| c.name() == "actix-session")
.is_some()); .is_some());
@ -352,6 +353,7 @@ mod tests {
let request = test::TestRequest::get().to_request(); let request = test::TestRequest::get().to_request();
let response = test::block_on(app.call(request)).unwrap(); let response = test::block_on(app.call(request)).unwrap();
assert!(response assert!(response
.response()
.cookies() .cookies()
.find(|c| c.name() == "actix-session") .find(|c| c.name() == "actix-session")
.is_some()); .is_some());

View File

@ -190,7 +190,7 @@ mod tests {
#[test] #[test]
fn session() { fn session() {
let mut req = test::TestRequest::default().to_service(); let mut req = test::TestRequest::default().to_srv_request();
Session::set_session( Session::set_session(
vec![("key".to_string(), "\"value\"".to_string())].into_iter(), vec![("key".to_string(), "\"value\"".to_string())].into_iter(),

View File

@ -64,7 +64,7 @@ pub fn handshake(req: &HttpRequest) -> Result<HttpResponseBuilder, HandshakeErro
} }
// Upgrade connection // Upgrade connection
if !req.upgrade() { if !req.head().upgrade() {
return Err(HandshakeError::NoConnectionUpgrade); return Err(HandshakeError::NoConnectionUpgrade);
} }

View File

@ -1,6 +1,6 @@
[package] [package]
name = "awc" name = "awc"
version = "0.1.0-alpha.3" version = "0.1.0-alpha.2"
authors = ["Nikolay Kim <fafhrd91@gmail.com>"] authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
description = "Actix http client." description = "Actix http client."
readme = "README.md" readme = "README.md"

View File

@ -45,14 +45,14 @@ fn test_simple() {
}); });
let request = srv.get("/").header("x-test", "111").send(); let request = srv.get("/").header("x-test", "111").send();
let response = srv.block_on(request).unwrap(); let mut response = srv.block_on(request).unwrap();
assert!(response.status().is_success()); assert!(response.status().is_success());
// read response // read response
let bytes = srv.block_on(response.body()).unwrap(); let bytes = srv.block_on(response.body()).unwrap();
assert_eq!(bytes, Bytes::from_static(STR.as_ref())); assert_eq!(bytes, Bytes::from_static(STR.as_ref()));
let response = srv.block_on(srv.post("/").send()).unwrap(); let mut response = srv.block_on(srv.post("/").send()).unwrap();
assert!(response.status().is_success()); assert!(response.status().is_success());
// read response // read response
@ -177,7 +177,7 @@ fn test_client_gzip_encoding() {
}); });
// client request // client request
let response = srv.block_on(srv.post("/").send()).unwrap(); let mut response = srv.block_on(srv.post("/").send()).unwrap();
assert!(response.status().is_success()); assert!(response.status().is_success());
// read response // read response
@ -200,7 +200,7 @@ fn test_client_gzip_encoding_large() {
}); });
// client request // client request
let response = srv.block_on(srv.post("/").send()).unwrap(); let mut response = srv.block_on(srv.post("/").send()).unwrap();
assert!(response.status().is_success()); assert!(response.status().is_success());
// read response // read response
@ -229,7 +229,7 @@ fn test_client_gzip_encoding_large_random() {
}); });
// client request // client request
let response = srv.block_on(srv.post("/").send_body(data.clone())).unwrap(); let mut response = srv.block_on(srv.post("/").send_body(data.clone())).unwrap();
assert!(response.status().is_success()); assert!(response.status().is_success());
// read response // read response
@ -253,7 +253,7 @@ fn test_client_brotli_encoding() {
}); });
// client request // client request
let response = srv.block_on(srv.post("/").send_body(STR)).unwrap(); let mut response = srv.block_on(srv.post("/").send_body(STR)).unwrap();
assert!(response.status().is_success()); assert!(response.status().is_success());
// read response // read response