diff options
author | James Lal <james@lightsofapollo.com> | 2012-07-24 09:20:16 -0700 |
---|---|---|
committer | James Lal <james@lightsofapollo.com> | 2012-07-24 09:20:16 -0700 |
commit | 55aa47aab5bba0126d33ff44fa0dbf7472a2d91a (patch) | |
tree | 20137cb87a9a1dbd754692c8c38e0f60ba0ac63f /test/caldav/sax/dav_response_test.js | |
parent | cbb1142c4dcefeffe47d85a14ea65fc23c9739a2 (diff) | |
download | jsCalDAV-55aa47aab5bba0126d33ff44fa0dbf7472a2d91a.tar.gz |
add some tests
Diffstat (limited to 'test/caldav/sax/dav_response_test.js')
-rw-r--r-- | test/caldav/sax/dav_response_test.js | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/test/caldav/sax/dav_response_test.js b/test/caldav/sax/dav_response_test.js index 45bc788..b6032f8 100644 --- a/test/caldav/sax/dav_response_test.js +++ b/test/caldav/sax/dav_response_test.js @@ -1,8 +1,8 @@ testSupport.lib('responder'); testSupport.lib('sax'); testSupport.lib('sax/base'); -testSupport.lib('sax/dav_response'); testSupport.lib('ical'); +testSupport.lib('sax/dav_response'); suite('caldav/sax/dav_response', function() { @@ -28,7 +28,30 @@ suite('caldav/sax/dav_response', function() { subject.registerHandler('DAV:/response', Response); }); - suite('parsing', function() { + suite('calendar-query', function() { + var xml; + + testSupport.defineSample('xml/calendar_query_single.xml', function(data) { + xml = data; + }); + + test('result', function(done) { + subject.once('complete', function(data) { + var response = data.multistatus; + var event = response['event.ics']; + assert.ok(event); + + console.log(event); + assert.ok(event['calendar-data'].value); + assert.ok(event['calendar-data'].value.vevent); + done(); + }); + + subject.write(xml).close(); + }); + }); + + suite('propget', function() { var xml; testSupport.defineSample('xml/propget.xml', function(data) { |