mirror of https://github.com/zulip/zulip.git
template.js: Add test for "or" helper.
This commit is contained in:
parent
66c12c9022
commit
2e910842d8
|
@ -15,3 +15,12 @@ run_test("and", () => {
|
||||||
const html = require("./templates/and.hbs")(args);
|
const html = require("./templates/and.hbs")(args);
|
||||||
assert.equal(html, "<p>empty and</p>\n<p>last and</p>\n\n");
|
assert.equal(html, "<p>empty and</p>\n<p>last and</p>\n\n");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
run_test("or", () => {
|
||||||
|
const args = {
|
||||||
|
last: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
const html = require("./templates/or.hbs")(args);
|
||||||
|
assert.equal(html, "\n<p>last or</p>\n<p>true or</p>\n");
|
||||||
|
});
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
{{#if (or)}}<p>empty or</p>{{/if}}
|
||||||
|
{{#if (or false last)}}<p>last or</p>{{/if}}
|
||||||
|
{{#if (or true false)}}<p>true or</p>{{/if}}
|
Loading…
Reference in New Issue