fix wrong transform test

This commit is contained in:
Nikolay Kim 2020-04-26 23:16:03 +06:00
parent 557f878895
commit ce85dcd047

View file

@ -274,9 +274,11 @@ mod tests {
#[ntex_rt::test] #[ntex_rt::test]
async fn transform() { async fn transform() {
let factory = apply(Rc::new(Tr), fn_service(|i: usize| ok::<_, ()>(i * 2))) let factory = apply(
.clone() Rc::new(Tr.map_init_err(|_| ()).clone()),
.map_init_err(|_| ()); fn_service(|i: usize| ok::<_, ()>(i * 2)),
)
.clone();
let srv = factory.new_service(()).await.unwrap(); let srv = factory.new_service(()).await.unwrap();
let res = srv.call(10).await; let res = srv.call(10).await;