[FIX] qweb: properly calls directive finalizers

closes #382
This commit is contained in:
Géry Debongnie
2019-10-22 20:20:07 +02:00
committed by aab-odoo
parent da6c24bbca
commit be556a970e
5 changed files with 56 additions and 12 deletions
+10
View File
@@ -328,6 +328,16 @@ describe("t-if", () => {
};
expect(normalize(renderToString(qweb, "test", context))).toBe("<div>andormgtnlt</div>");
});
test("t-esc with t-if", () => {
qweb.addTemplate("test", `<div><t t-if="true" t-esc="'x'"/></div>`);
expect(renderToString(qweb, "test")).toBe("<div>x</div>");
});
test("t-esc with t-elif", () => {
qweb.addTemplate("test", `<div><t t-if="false">abc</t><t t-else="1" t-esc="'x'"/></div>`);
expect(renderToString(qweb, "test")).toBe("<div>x</div>");
});
});
describe("attributes", () => {