aboutsummaryrefslogtreecommitdiffstats
path: root/test/caldav/sax_test.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/caldav/sax_test.js')
-rw-r--r--test/caldav/sax_test.js20
1 files changed, 17 insertions, 3 deletions
diff --git a/test/caldav/sax_test.js b/test/caldav/sax_test.js
index 8896abf..a175cdd 100644
--- a/test/caldav/sax_test.js
+++ b/test/caldav/sax_test.js
@@ -15,6 +15,7 @@ suite('caldav/sax', function() {
// to make testing easier.
function TestHander() {
this.text = [];
+ this.cdata = [];
this.opentag = [];
this.closetag = [];
this.error = [];
@@ -22,9 +23,13 @@ suite('caldav/sax', function() {
this.end = [];
var events = [
- 'ontext', 'onclosetag',
- 'onopentag', 'onerror',
- 'oncomplete', 'onend'
+ 'ontext',
+ 'oncdata',
+ 'onclosetag',
+ 'onopentag',
+ 'onerror',
+ 'oncomplete',
+ 'onend'
];
}
@@ -34,6 +39,10 @@ suite('caldav/sax', function() {
handler.text.push(data);
},
+ oncdata: function(data, handler) {
+ handler.cdata.push(data);
+ },
+
onclosetag: function(data, handler) {
handler.closetag.push(data);
},
@@ -237,6 +246,11 @@ suite('caldav/sax', function() {
firesHandler('text', 'foo');
});
+ test('#oncdata', function() {
+ subject.oncdata('foo');
+ firesHandler('cdata', 'foo');
+ });
+
test('#onerror', function() {
subject.onerror('foo');
firesHandler('error', 'foo');