1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-08-25 13:36:03 +02:00

add test and main macros

This commit is contained in:
Nikolay Kim
2019-11-25 21:49:11 +06:00
parent 1fddd1e75b
commit 4ceac79f2c
25 changed files with 265 additions and 267 deletions

View File

@@ -196,7 +196,7 @@ mod tests {
}
}
#[tokio::test]
#[actix_rt::test]
async fn test_call() {
let mut srv = pipeline(apply_fn(Srv, |req: &'static str, srv| {
let fut = srv.call(());
@@ -213,7 +213,7 @@ mod tests {
assert_eq!(res.unwrap(), (("srv", ())));
}
#[tokio::test]
#[actix_rt::test]
async fn test_new_service() {
let new_srv = pipeline_factory(apply_fn_factory(
|| ok::<_, ()>(Srv),