summaryrefslogtreecommitdiffstats
path: root/vendor/handlebars/tests/helper_macro.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/handlebars/tests/helper_macro.rs')
-rw-r--r--vendor/handlebars/tests/helper_macro.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/vendor/handlebars/tests/helper_macro.rs b/vendor/handlebars/tests/helper_macro.rs
index cc5ed914b..f40ab778a 100644
--- a/vendor/handlebars/tests/helper_macro.rs
+++ b/vendor/handlebars/tests/helper_macro.rs
@@ -86,4 +86,24 @@ fn test_macro_helper() {
.unwrap(),
"2015-02-18"
);
+
+ assert_eq!(
+ hbs.render_template("{{eq image.link null}}", &json!({"image": {"link": null}}))
+ .unwrap(),
+ "true"
+ );
+
+ assert_eq!(
+ hbs.render_template(
+ "{{eq image.link null}}",
+ &json!({"image": {"link": "https://url"}})
+ )
+ .unwrap(),
+ "false"
+ );
+
+ assert_eq!(
+ hbs.render_template("{{tag 'html'}}", &()).unwrap(),
+ "<html>"
+ );
}