mirror of
https://github.com/actix/examples
synced 2025-01-23 06:14:35 +01:00
Merge pull request #106 from tizgafa/yarte_update
Update template_yarte to actix_web-1.0.0-alpha.3
This commit is contained in:
commit
d51fdc72f3
@ -39,8 +39,8 @@ mod test {
|
|||||||
fn test() {
|
fn test() {
|
||||||
let mut srv = TestServer::new(|| HttpService::new(App::new().service(index)));
|
let mut srv = TestServer::new(|| HttpService::new(App::new().service(index)));
|
||||||
|
|
||||||
let req = srv.get();
|
let req = srv.get("/");
|
||||||
let response = srv.block_on(req.send()).unwrap();
|
let mut response = srv.block_on(req.send()).unwrap();
|
||||||
assert!(response.status().is_success());
|
assert!(response.status().is_success());
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
@ -67,8 +67,8 @@ mod test {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
let req = srv.get().uri(srv.url("/?name=foo&lastname=bar"));
|
let req = srv.get("/?name=foo&lastname=bar");
|
||||||
let response = srv.block_on(req.send()).unwrap();
|
let mut response = srv.block_on(req.send()).unwrap();
|
||||||
assert!(response.status().is_success());
|
assert!(response.status().is_success());
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
@ -90,12 +90,12 @@ mod test {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
let req = srv.get().uri(srv.url("/?name=foo"));
|
let req = srv.get("/?name=foo");
|
||||||
let response = srv.block_on(req.send()).unwrap();
|
let mut response = srv.block_on(req.send()).unwrap();
|
||||||
assert!(response.status().is_server_error());
|
assert!(response.status().is_server_error());
|
||||||
|
|
||||||
let req = srv.get().uri(srv.url("/?lastname=bar"));
|
let req = srv.get("/?lastname=bar");
|
||||||
let response = srv.block_on(req.send()).unwrap();
|
let mut response = srv.block_on(req.send()).unwrap();
|
||||||
assert!(response.status().is_success());
|
assert!(response.status().is_success());
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user