diff options
Diffstat (limited to 'test/caldav/sax')
-rw-r--r-- | test/caldav/sax/dav_response_test.js | 26 |
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(); |