From 95d50ef280c46ce6a29454285ccd7fc42cbcac61 Mon Sep 17 00:00:00 2001 From: James Lal Date: Tue, 26 Jun 2012 12:41:13 +0200 Subject: Add process result so we can have cleaner propfind results --- test/webcals/request/propfind_test.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'test/webcals') diff --git a/test/webcals/request/propfind_test.js b/test/webcals/request/propfind_test.js index 998fd2f..6d2dbe7 100644 --- a/test/webcals/request/propfind_test.js +++ b/test/webcals/request/propfind_test.js @@ -77,6 +77,22 @@ suite('webcals/request/propfind', function() { assert.equal(subject._createPayload(), expected); }); + test('#_processResult', function(done) { + var inner = {}, + req = {}; + + subject.sax.root = { + multistatus: inner + }; + + subject._processResult(req, function(err, obj, xhr) { + assert.equal(xhr, req); + assert.equal(obj, inner); + assert.equal(err, null); + done(); + }); + }); + suite('integration', function() { var xml, data, @@ -101,8 +117,7 @@ suite('webcals/request/propfind', function() { }); test('simple tree', function() { - assert.ok(data.multistatus); - assert.ok(data.multistatus['/calendar/user/']); + assert.ok(data['/calendar/user/']); }); }); -- cgit