Skip to content

Commit

Permalink
(test) add test case for invert tag
Browse files Browse the repository at this point in the history
  • Loading branch information
sunng87 committed Jun 30, 2021
1 parent 07c1c21 commit 509e3d0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/helpers/helper_if.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,11 @@ mod test {
hbs.render_template("{{#if a}}x{{/if}}\ny", &json!({"a": true}))
.unwrap()
);

assert_eq!(
"y\nz",
hbs.render_template("{{#if a}}\nx\n{{^}}\ny\n{{/if}}\nz", &json!({"a": false}))
.unwrap()
);
}
}

0 comments on commit 509e3d0

Please sign in to comment.