aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJames Lal <james@lightsofapollo.com>2012-10-02 23:15:26 -0700
committerJames Lal <james@lightsofapollo.com>2012-10-02 23:15:26 -0700
commitda93e0810d194a2b484f89e0bb4b121e41ad5c0c (patch)
tree4e9d3ded5654e18a30bb8d238e6f4f1068f905fd /test
parentaab1962fddca206676c5427288b185e1bdad89c3 (diff)
downloadjsCalDAV-da93e0810d194a2b484f89e0bb4b121e41ad5c0c.tar.gz
add appendString for adding arbitrary content
Diffstat (limited to 'test')
-rw-r--r--test/caldav/query_builder_test.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/caldav/query_builder_test.js b/test/caldav/query_builder_test.js
index 2e8bd8a..ea33c73 100644
--- a/test/caldav/query_builder_test.js
+++ b/test/caldav/query_builder_test.js
@@ -20,6 +20,28 @@ suite('caldav/query_builder', function() {
template = new Template('container');
});
+ suite('Node', function() {
+ var builder;
+
+ setup(function() {
+ builder = new Builder({ template: template });
+ });
+
+ test('export', function() {
+ assert.ok(Builder.Node);
+ });
+
+ test('#appendString', function() {
+ var subject = new Builder.Node(builder, 'foo');
+ subject.appendString('<a></a>');
+ var out = subject.toString();
+ assert.equal(
+ out,
+ '<N0:comp name="foo"><a></a></N0:comp>'
+ );
+ });
+ });
+
test('no template given', function() {
assert.throws(function() {
new Builder();