diff options
author | James Lal <james@lightsofapollo.com> | 2012-06-19 23:31:02 -0700 |
---|---|---|
committer | James Lal <james@lightsofapollo.com> | 2012-06-19 23:31:02 -0700 |
commit | d89e5a43dadff8d1b2c42e9bf5ea3bc129706d90 (patch) | |
tree | 7fe2e3b4add4daa9f77f6bc01b5fb8375b9b193d /test/webcals/sax/dav_response_test.js | |
parent | 038911be29c875e0fcd24472e815167bb98ce833 (diff) | |
download | jsCalDAV-d89e5a43dadff8d1b2c42e9bf5ea3bc129706d90.tar.gz |
Basic multi response parser.
Diffstat (limited to 'test/webcals/sax/dav_response_test.js')
-rw-r--r-- | test/webcals/sax/dav_response_test.js | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/test/webcals/sax/dav_response_test.js b/test/webcals/sax/dav_response_test.js index 8e84e6b..36616b6 100644 --- a/test/webcals/sax/dav_response_test.js +++ b/test/webcals/sax/dav_response_test.js @@ -34,11 +34,11 @@ suite('webcals/sax/base', function() { }); expected = { - '/calendar/user': { + '/calendar/user/': { 'principal-URL': { status: '200', - value: '/calendar/user/' + value: '/calendar/pinc/' }, resourcetype: { @@ -47,6 +47,11 @@ suite('webcals/sax/base', function() { 'principal', 'collection' ] + }, + + 'current-user-principal': { + status: '404', + value: {} } }, @@ -60,12 +65,12 @@ suite('webcals/sax/base', function() { test('output', function(done) { subject.once('complete', function(data) { - console.log(JSON.stringify(data)); - //assert.deepEqual( - //data, expected, - //"expected \n '" + JSON.stringify(data) + "'\n to equal \n '" + - //JSON.stringify(expected) + '\n"' - //); + console.log(JSON.stringify(data.multistatus)); + assert.deepEqual( + data.multistatus, expected, + "expected \n '" + JSON.stringify(data.multistatus) + + "'\n to equal \n '" + JSON.stringify(expected) + '\n"' + ); done(); }); subject.write(xml).close(); |