aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Lal <james@lightsofapollo.com>2012-06-19 14:25:16 -0700
committerJames Lal <james@lightsofapollo.com>2012-06-19 14:25:16 -0700
commitbe947b56151b774d4b555097f2b8a8b4f47b633d (patch)
tree21552638cd7bf8ad1001edb128d3458a5887c8b4
parentfc8fc29ffbd335bfbcccee06f168e6c0408a20a1 (diff)
downloadjsCalDAV-be947b56151b774d4b555097f2b8a8b4f47b633d.tar.gz
Adding example of orphaning a tag
-rw-r--r--test/webcals/sax_test.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/webcals/sax_test.js b/test/webcals/sax_test.js
index 71f6571..18a18a0 100644
--- a/test/webcals/sax_test.js
+++ b/test/webcals/sax_test.js
@@ -278,6 +278,17 @@ suite('webcals/sax', function() {
ResponseHandler = Base.create({
name: 'response',
+ onopentag: function(data, handler) {
+ //if you don't want to append items
+ //to the object its fairly simple just
+ //orphan the tag.
+ if (data.tagSpec === 'DAV:/response') {
+ return this.current = {};
+ }
+
+ handler._super.onopentag.call(this, data, handler);
+ },
+
handles: {
'DAV:/href': TextOnlyHandler,
'DAV:/status': TextOnlyHandler,
@@ -322,7 +333,6 @@ suite('webcals/sax', function() {
expectedResult = {
complex: {
- response: [{}, expectedEvent]
}
};