Add more tests for blocks args/kwargs

This commit is contained in:
Samy Pessé
2015-09-17 11:21:55 +02:00
parent b24760c819
commit f5afbc90a4
+15 -1
View File
@@ -192,7 +192,21 @@ describe("Plugins", function () {
});
});
it("should correctly extend template blocks with arguments", function() {
it("should correctly extend template blocks with arguments (1)", function() {
return testTpl("{% test5args \"a\" %}{% endtest5args %}")
.then(function(content) {
content.should.equal("test5atest5");
});
});
it("should correctly extend template blocks with arguments (2)", function() {
return testTpl("{% test5args 'a', 'b' %}{% endtest5args %}")
.then(function(content) {
content.should.equal("test5a,btest5");
});
});
it("should correctly extend template blocks with arguments (3)", function() {
return testTpl("{% test5args 'a', 'b', 'c' %}{% endtest5args %}")
.then(function(content) {
content.should.equal("test5a,b,ctest5");