aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJames Lal <james@lightsofapollo.com>2012-06-27 11:50:22 +0200
committerJames Lal <james@lightsofapollo.com>2012-06-27 11:50:22 +0200
commit20420489ef9ded9b16852bc84b4b36d5bf363680 (patch)
treeb5523d6ffdc1e98fdd3dc767916caddb8eed2321 /test
parentc3db57754c540129bd004137ab88be69788217d2 (diff)
downloadjsCalDAV-20420489ef9ded9b16852bc84b4b36d5bf363680.tar.gz
template will now accept objects with a .render fn
Diffstat (limited to 'test')
-rw-r--r--test/webcals/template_test.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/webcals/template_test.js b/test/webcals/template_test.js
index 05b61b6..eb1e280 100644
--- a/test/webcals/template_test.js
+++ b/test/webcals/template_test.js
@@ -81,6 +81,21 @@ suite('templates', function() {
);
});
+ test('when given a an object /w .render in content', function() {
+ var obj = {
+ render: function(template) {
+ return template.tag('baz');
+ }
+ };
+
+ var out = subject.tag('foo', obj);
+
+ assert.equal(
+ out,
+ '<N0:foo><N0:baz /></N0:foo>'
+ );
+ });
+
test('with attrs', function() {
var out = subject.tag('bar', {
value: 'val'