aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJames Lal <james@lightsofapollo.com>2012-07-26 10:24:59 -0700
committerJames Lal <james@lightsofapollo.com>2012-07-26 10:24:59 -0700
commit1634e5e1ab44eed2881b301905ae7be4353a36d4 (patch)
tree6964eb283d86a5281560267bf5af29e174e5e61d /test
parent0ca56ee8c47a580d33881ea05a5975e507131172 (diff)
downloadjsCalDAV-1634e5e1ab44eed2881b301905ae7be4353a36d4.tar.gz
emit DAV:/response on sax for each response
Diffstat (limited to 'test')
-rw-r--r--test/caldav/sax/dav_response_test.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/caldav/sax/dav_response_test.js b/test/caldav/sax/dav_response_test.js
index 1dac79d..cb3d2b7 100644
--- a/test/caldav/sax/dav_response_test.js
+++ b/test/caldav/sax/dav_response_test.js
@@ -90,12 +90,38 @@ suite('caldav/sax/dav_response', function() {
};
test('output', function(done) {
+ var response = [];
+
+ subject.on('DAV:/response', function(url, data) {
+ response.push([url, data]);
+ });
+
+
subject.once('complete', function(data) {
assert.deepEqual(
data.multistatus, expected,
"expected \n '" + JSON.stringify(data.multistatus) +
"'\n to equal \n '" + JSON.stringify(expected) + '\n"'
);
+
+ assert.deepEqual(
+ [
+ '/calendar/user/',
+ expected['/calendar/user/']
+ ],
+ response[0],
+ '/calendar/user/ response'
+ );
+
+ assert.deepEqual(
+ [
+ '/calendar/other',
+ expected['/calendar/other']
+ ],
+ response[1],
+ '/calendar/other/ response'
+ );
+
done();
});
subject.write(xml).close();