summaryrefslogtreecommitdiffstats
path: root/test/template.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/template.js')
-rw-r--r--test/template.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/template.js b/test/template.js
index d12a641..a76fe93 100644
--- a/test/template.js
+++ b/test/template.js
@@ -34,6 +34,15 @@ describe('Template', function() {
.should.be.fulfilledWith('Hello World!');
});
+ it('should correctly add a block with args', function() {
+ output.template.addBlock('sayhello_args', function(blk) {
+ return 'Hello ' + blk.args[0] + '!';
+ });
+
+ return output.template.renderString('{% sayhello_args "World" %}{% endsayhello_args %}')
+ .should.be.fulfilledWith('Hello World!');
+ });
+
it('should correctly add a block with kwargs', function() {
output.template.addBlock('sayhello_kwargs', function(blk) {
return 'Hello ' + blk.kwargs.name + '!';