More binding tests.

This commit is contained in:
Andrew McMillan 2010-09-02 23:06:09 +12:00
parent b673ec32e6
commit 52695d86ec
6 changed files with 416 additions and 0 deletions

View File

@ -0,0 +1,44 @@
HTTP/1.1 201 Created
Date: Dow, 01 Jan 2000 00:00:00 GMT
DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule
Location: /caldav.php/user4/boundbase/
Content-Length: 0
Content-Type: text/plain; charset="utf-8"
bind_id: >1434<
bound_source_id: >11<
dav_displayname: >Updated Displayname with PROPPATCH<
dav_name: >/user4/user2/<
length: >8<
parent_container: >/user4/<
bind_id: >1435<
bound_source_id: >10<
dav_displayname: >User 1's Calendaranza<
dav_name: >/user4/user1/<
length: >8<
parent_container: >/user4/<
bind_id: >1439<
bound_source_id: >10<
dav_displayname: >User 1's Calendaranza<
dav_name: >/user4/base/user1/<
length: >8<
parent_container: >/user4/base/<
bind_id: >1440<
bound_source_id: >11<
dav_displayname: >User 2's Calendar, as uploaded by Admin<
dav_name: >/user4/base/user2/<
length: >8<
parent_container: >/user4/base/<
bind_id: >1454<
bound_source_id: >1437<
dav_displayname: >A normal collection<
dav_name: >/user4/boundbase/<
length: >NULL<
parent_container: >/user4/<

View File

@ -0,0 +1,39 @@
#
# Here we are binding against a collection containing further
# bindings, at the same level in the same collection.
#
# Before:
# /user4/base a collection containing two bindings and a collection
#
# After:
# /user4/boundbase is bound to /user4/base, so it should also appear
# to contain two bindings and a collection
#
TYPE=BIND
URL=http://regression.host/caldav.php/user4/
AUTH=user4:user4
HEADER=User-Agent: Ticket Spec Tests
HEADER=Content-Type: text/xml; charset="UTF-8"
HEAD
BEGINDATA
<?xml version="1.0" encoding="utf-8"?>
<bind xmlns="DAV:">
<segment>boundbase</segment>
<href>/caldav.php/user4/base</href>
</bind>
ENDDATA
QUERY
SELECT bind_id,
bound_source_id,
length(access_ticket_id),
parent_container,
dav_name,
dav_displayname
FROM dav_binding
ORDER BY bind_id
ENDQUERY

View File

@ -0,0 +1,131 @@
<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:X="http://xmlns.comical.net/birds" xmlns:X1="http://xmlns.davical.org/davical">
<response>
<href>/caldav.php/user4/base/</href>
<propstat>
<prop>
<displayname>A normal collection</displayname>
<resource-id>
<href>/caldav.php/.resources/1437</href>
</resource-id>
<parent-set>
<parent>
<href>/caldav.php</href>
<segment>user4</segment>
</parent>
</parent-set>
<resourcetype>
<collection/>
</resourcetype>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
<response>
<href>/caldav.php/user4/base/user1/</href>
<propstat>
<prop>
<displayname>User 1's Calendaranza</displayname>
<resource-id>
<href>/caldav.php/.resources/10</href>
</resource-id>
<parent-set>
<parent>
<href>/caldav.php</href>
<segment>user4</segment>
</parent>
<parent>
<href>/caldav.php/user4</href>
<segment>base</segment>
</parent>
<parent>
<href>/caldav.php</href>
<segment>user1</segment>
</parent>
</parent-set>
<resourcetype>
<collection/>
<C:calendar/>
<X:spotted-grebe/>
<X1:webdav-binding/>
</resourcetype>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
<response>
<href>/caldav.php/user4/base/user2/</href>
<propstat>
<prop>
<displayname>User 2's Calendar, as uploaded by Admin</displayname>
<resource-id>
<href>/caldav.php/.resources/11</href>
</resource-id>
<parent-set>
<parent>
<href>/caldav.php</href>
<segment>user4</segment>
</parent>
<parent>
<href>/caldav.php/user4</href>
<segment>base</segment>
</parent>
<parent>
<href>/caldav.php</href>
<segment>user2</segment>
</parent>
</parent-set>
<resourcetype>
<collection/>
<C:calendar/>
<X1:webdav-binding/>
</resourcetype>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
<response>
<href>/caldav.php/user4/base/calendar/</href>
<propstat>
<prop>
<displayname>A sub collection</displayname>
<resource-id>
<href>/caldav.php/.resources/1438</href>
</resource-id>
<parent-set>
<parent>
<href>/caldav.php/user4</href>
<segment>base</segment>
</parent>
</parent-set>
<resourcetype>
<collection/>
<C:calendar/>
</resourcetype>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
<response>
<href>/caldav.php/user4/base/newcalendar/</href>
<propstat>
<prop>
<displayname>newcalendar</displayname>
<resource-id>
<href>/caldav.php/.resources/1443</href>
</resource-id>
<parent-set>
<parent>
<href>/caldav.php/user4</href>
<segment>base</segment>
</parent>
</parent-set>
<resourcetype>
<collection/>
<C:calendar/>
</resourcetype>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
</multistatus>

View File

@ -0,0 +1,27 @@
#
# PROPFIND on a real collection in which we have binds & collections
#
# In this case we're doing Depth: 0
#
TYPE=PROPFIND
URL=http://regression.host/caldav.php/user4/base/
AUTH=user4:user4
HEADER=User-Agent: BIND Spec Tests
HEADER=Content-Type: text/xml; charset="UTF-8"
HEADER=Depth: 1
BEGINDATA
<?xml version="1.0" encoding="utf-8"?>
<propfind xmlns="DAV:">
<prop>
<displayname/>
<resource-id/>
<parent-set/>
<resourcetype/>
</prop>
</propfind>
ENDDATA
# <current-user-privilege-set/>

View File

@ -0,0 +1,148 @@
<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:" xmlns:X="http://xmlns.davical.org/davical" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:X1="http://xmlns.comical.net/birds">
<response>
<href>/caldav.php/user4/boundbase/</href>
<propstat>
<prop>
<displayname>A normal collection</displayname>
<resource-id>
<href>/caldav.php/.resources/1437</href>
</resource-id>
<parent-set>
<parent>
<href>/caldav.php</href>
<segment>user4</segment>
</parent>
</parent-set>
<resourcetype>
<collection/>
<X:webdav-binding/>
</resourcetype>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
<response>
<href>/caldav.php/user4/boundbase/user1/</href>
<propstat>
<prop>
<displayname>User 1's Calendaranza</displayname>
<resource-id>
<href>/caldav.php/.resources/10</href>
</resource-id>
<parent-set>
<parent>
<href>/caldav.php</href>
<segment>user4</segment>
</parent>
<parent>
<href>/caldav.php/user4</href>
<segment>base</segment>
</parent>
<parent>
<href>/caldav.php</href>
<segment>user1</segment>
</parent>
<parent>
<href>/caldav.php/user4</href>
<segment>boundbase</segment>
</parent>
</parent-set>
<resourcetype>
<collection/>
<C:calendar/>
<X1:spotted-grebe/>
<X:webdav-binding/>
</resourcetype>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
<response>
<href>/caldav.php/user4/boundbase/user2/</href>
<propstat>
<prop>
<displayname>User 2's Calendar, as uploaded by Admin</displayname>
<resource-id>
<href>/caldav.php/.resources/11</href>
</resource-id>
<parent-set>
<parent>
<href>/caldav.php</href>
<segment>user4</segment>
</parent>
<parent>
<href>/caldav.php/user4</href>
<segment>base</segment>
</parent>
<parent>
<href>/caldav.php</href>
<segment>user2</segment>
</parent>
<parent>
<href>/caldav.php/user4</href>
<segment>boundbase</segment>
</parent>
</parent-set>
<resourcetype>
<collection/>
<C:calendar/>
<X:webdav-binding/>
</resourcetype>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
<response>
<href>/caldav.php/user4/boundbase/calendar/</href>
<propstat>
<prop>
<displayname>A sub collection</displayname>
<resource-id>
<href>/caldav.php/.resources/1438</href>
</resource-id>
<parent-set>
<parent>
<href>/caldav.php/user4</href>
<segment>base</segment>
</parent>
<parent>
<href>/caldav.php/user4</href>
<segment>boundbase</segment>
</parent>
</parent-set>
<resourcetype>
<collection/>
<C:calendar/>
</resourcetype>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
<response>
<href>/caldav.php/user4/boundbase/newcalendar/</href>
<propstat>
<prop>
<displayname>newcalendar</displayname>
<resource-id>
<href>/caldav.php/.resources/1443</href>
</resource-id>
<parent-set>
<parent>
<href>/caldav.php/user4</href>
<segment>base</segment>
</parent>
<parent>
<href>/caldav.php/user4</href>
<segment>boundbase</segment>
</parent>
</parent-set>
<resourcetype>
<collection/>
<C:calendar/>
</resourcetype>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
</multistatus>

View File

@ -0,0 +1,27 @@
#
# PROPFIND on a collection in which we have binds & collections
#
# In this case we're doing Depth: 0
#
TYPE=PROPFIND
URL=http://regression.host/caldav.php/user4/boundbase/
AUTH=user4:user4
HEADER=User-Agent: BIND Spec Tests
HEADER=Content-Type: text/xml; charset="UTF-8"
HEADER=Depth: 1
BEGINDATA
<?xml version="1.0" encoding="utf-8"?>
<propfind xmlns="DAV:">
<prop>
<displayname/>
<resource-id/>
<parent-set/>
<resourcetype/>
</prop>
</propfind>
ENDDATA
# <current-user-privilege-set/>