From e2f17fc21ea5a992670adabe6c90f250928af23b Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Mon, 23 Dec 2019 03:51:33 +0900 Subject: [PATCH] Fix form example's test (#216) * Update method name * Fix typo --- form/src/main.rs | 7 ++++--- template_handlebars/src/README.md | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/form/src/main.rs b/form/src/main.rs index d2e0cfff..1ce3d102 100644 --- a/form/src/main.rs +++ b/form/src/main.rs @@ -141,13 +141,14 @@ mod tests { .data(AppState { foo: "bar".to_string(), }) - .to_http_request() - .get_app_data() + .to_http_request(); + let data = state + .app_data::>() .unwrap(); let params = Form(MyParams { name: "John".to_string(), }); - let resp = handle_post_2(state, params).await; + let resp = handle_post_2(data.clone(), params).await; assert_eq!(resp.status(), StatusCode::OK); assert_eq!( diff --git a/template_handlebars/src/README.md b/template_handlebars/src/README.md index 88139535..7fc81da3 100644 --- a/template_handlebars/src/README.md +++ b/template_handlebars/src/README.md @@ -4,4 +4,4 @@ This is an example of how to use Actix Web with the [Handlebars templating langu - http://localhost:8080 - http://localhost:8080/Emma/documents -- http://localhost:8080/Bob/passwordds \ No newline at end of file +- http://localhost:8080/Bob/passwords