mirror of https://github.com/rwf2/Rocket.git
Use 'into()' in handlebars templates tests.
This commit is contained in:
parent
f87b46d6c5
commit
bbad1a11ec
|
@ -44,8 +44,8 @@ fn test_name() {
|
||||||
// Check that the /hello/<name> route works.
|
// Check that the /hello/<name> route works.
|
||||||
dispatch!(Get, "/hello/Jack", |mut response: LocalResponse| {
|
dispatch!(Get, "/hello/Jack", |mut response: LocalResponse| {
|
||||||
let context = super::TemplateContext {
|
let context = super::TemplateContext {
|
||||||
name: "Jack".to_string(),
|
name: "Jack".into(),
|
||||||
items: vec!["One", "Two", "Three"].iter().map(|s| s.to_string()).collect()
|
items: vec!["One".into(), "Two".into(), "Three".into()]
|
||||||
};
|
};
|
||||||
|
|
||||||
let expected = Template::show(TEMPLATE_ROOT, "index", &context).unwrap();
|
let expected = Template::show(TEMPLATE_ROOT, "index", &context).unwrap();
|
||||||
|
|
Loading…
Reference in New Issue