Works fine with the partial but without parameters.

This commit is contained in:
Tom Alexander 2020-05-09 15:08:31 -04:00
parent 569b4594be
commit 710785139a
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
1 changed files with 9 additions and 2 deletions

View File

@ -1056,7 +1056,7 @@ mod tests {
#[test]
fn test_full_document_temp() {
assert_eq!(
super::template(r#"{#level3.level4}{/level3.level4}"#),
super::template(r#"{#level3.level4}{>partialtwo/}{/level3.level4}"#),
Ok::<_, nom::Err<(&str, ErrorKind)>>((
"",
Template {
@ -1065,7 +1065,14 @@ mod tests {
path: Path {
keys: vec!["level3", "level4"]
},
contents: None,
contents: Some(Body {
elements: vec![TemplateElement::TETag(DustTag::DTPartial(
Partial {
name: "partialtwo".to_owned(),
params: vec![]
}
))]
}),
else_contents: None
}))]
}