1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-27 09:42:57 +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]
name = "actix-web"
version = "1.0.0-alpha.3"
version = "1.0.0-alpha.2"
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
description = "Actix web is a simple, pragmatic and extremely fast web framework for Rust."
readme = "README.md"

View File

@ -552,7 +552,7 @@ impl<P> FromRequest<P> for PathBufWrp {
type Future = Result<Self, Self::Error>;
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(&()),
)
.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);
assert_eq!(resp.status(), StatusCode::OK);

View File

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

View File

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

View File

@ -190,7 +190,7 @@ mod tests {
#[test]
fn session() {
let mut req = test::TestRequest::default().to_service();
let mut req = test::TestRequest::default().to_srv_request();
Session::set_session(
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
if !req.upgrade() {
if !req.head().upgrade() {
return Err(HandshakeError::NoConnectionUpgrade);
}

View File

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

View File

@ -45,14 +45,14 @@ fn test_simple() {
});
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());
// read response
let bytes = srv.block_on(response.body()).unwrap();
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());
// read response
@ -177,7 +177,7 @@ fn test_client_gzip_encoding() {
});
// 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());
// read response
@ -200,7 +200,7 @@ fn test_client_gzip_encoding_large() {
});
// 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());
// read response
@ -229,7 +229,7 @@ fn test_client_gzip_encoding_large_random() {
});
// 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());
// read response
@ -253,7 +253,7 @@ fn test_client_brotli_encoding() {
});
// 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());
// read response