allow static and dynamic attributes to combine in qweb

This commit is contained in:
Géry Debongnie
2019-03-04 11:24:35 +01:00
parent ca32d8b856
commit 0983ff0d24
4 changed files with 30 additions and 3 deletions
+6
View File
@@ -420,6 +420,12 @@ describe("attributes", () => {
const expected = `<div foo="&lt;foo" bar="&lt;bar&gt;" baz="&lt;&quot;&lt;baz&gt;&quot;&gt;" qux="&lt;&gt;"></div>`;
expect(result).toBe(expected);
});
test("t-att-class and class should combine together", () => {
qweb.addTemplate("test", `<div class="hello" t-att-class="value"/>`);
const result = renderToString(qweb, "test", { value: "world" });
expect(result).toBe(`<div class="hello world"></div>`);
});
});
describe("t-call (template calling", () => {