diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-09-17 11:21:55 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-09-17 11:21:55 +0200 |
commit | f5afbc90a4a6b0fec64a35581e6d4383253bd5aa (patch) | |
tree | b5f3d90af3a1b9c0629b20a3ca43c74d82e5a040 /test | |
parent | b24760c8197e06de344c795011df41c83155b938 (diff) | |
download | gitbook-f5afbc90a4a6b0fec64a35581e6d4383253bd5aa.zip gitbook-f5afbc90a4a6b0fec64a35581e6d4383253bd5aa.tar.gz gitbook-f5afbc90a4a6b0fec64a35581e6d4383253bd5aa.tar.bz2 |
Add more tests for blocks args/kwargs
Diffstat (limited to 'test')
-rw-r--r-- | test/plugins.js | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/test/plugins.js b/test/plugins.js index e6df389..797fc38 100644 --- a/test/plugins.js +++ b/test/plugins.js @@ -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"); |