New tests for freebusy requests against unauthorised and non-existent users.

This commit is contained in:
Andrew McMillan 2008-11-01 18:06:38 +13:00
parent 2cfbc15956
commit c12b78eb06
4 changed files with 104 additions and 0 deletions

View File

@ -0,0 +1,17 @@
HTTP/1.1 200 OK
Date: Dow, 01 Jan 2000 00:00:00 GMT
DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
ETag: "6688f740e99f71251b662dc5b901c1b6"
Content-Length: 314
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
<schedule-response xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
<C:response>
<C:recipient>
<href>mailto:user3@example.net</href>
</C:recipient>
<C:request-status>3.8;No authority</C:request-status>
<C:calendar-data/>
</C:response>
</schedule-response>

View File

@ -0,0 +1,35 @@
#
# POST to scheduling outbox for freebusy query on user2
#
TYPE=POST
URL=http://mycaldav/caldav.php/user1/.out/
HEADER=User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.18pre) Gecko/20080917 Sunbird/0.9
HEADER=Accept: text/xml
HEADER=Accept-Language: en-us,en;q=0.5
HEADER=Accept-Encoding: gzip,deflate
HEADER=Accept-Charset: utf-8,*;q=0.1
HEADER=Content-Type: text/calendar; charset=utf-8
HEADER=Originator: mailto:user1@example.net
HEADER=Recipient: mailto:user3@example.net
HEAD
REPLACE=/^DTSTAMP:\d{4}[01]\d[0123]\dT[012]\d[0-5]\d[0-6]\dZ\r?$/DTSTAMP:yyyymmddThhmmssZ/
BEGINDATA
BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VFREEBUSY
DTSTAMP:20081022T062945Z
ORGANIZER:mailto:user1@example.net
DTSTART:20081020T110000Z
DTEND:20081105T110000Z
UID:c5bd82ea-cd89-4f58-8d31-336f47e44f97
ATTENDEE;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT;CUTYPE=INDIVIDUAL:
mailto:user3@example.net
END:VFREEBUSY
END:VCALENDAR
ENDDATA

View File

@ -0,0 +1,17 @@
HTTP/1.1 200 OK
Date: Dow, 01 Jan 2000 00:00:00 GMT
DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
ETag: "0a963d6aa5a4ae8d91f2f6cebe27ad96"
Content-Length: 331
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
<schedule-response xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
<C:response>
<C:recipient>
<href>mailto:ultrabogosity@example.net</href>
</C:recipient>
<C:request-status>3.7;Invalid Calendar User</C:request-status>
<C:calendar-data/>
</C:response>
</schedule-response>

View File

@ -0,0 +1,35 @@
#
# POST to scheduling outbox for freebusy query on user2
#
TYPE=POST
URL=http://mycaldav/caldav.php/user1/.out/
HEADER=User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.18pre) Gecko/20080917 Sunbird/0.9
HEADER=Accept: text/xml
HEADER=Accept-Language: en-us,en;q=0.5
HEADER=Accept-Encoding: gzip,deflate
HEADER=Accept-Charset: utf-8,*;q=0.1
HEADER=Content-Type: text/calendar; charset=utf-8
HEADER=Originator: mailto:user1@example.net
HEADER=Recipient: mailto:ultrabogosity@example.net
HEAD
REPLACE=/^DTSTAMP:\d{4}[01]\d[0123]\dT[012]\d[0-5]\d[0-6]\dZ\r?$/DTSTAMP:yyyymmddThhmmssZ/
BEGINDATA
BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VFREEBUSY
DTSTAMP:20081022T062945Z
ORGANIZER:mailto:user1@example.net
DTSTART:20081020T110000Z
DTEND:20081105T110000Z
UID:c5bd82ea-cd89-4f58-8d31-336f47e44f97
ATTENDEE;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT;CUTYPE=INDIVIDUAL:
mailto:ultrabogosity@example.net
END:VFREEBUSY
END:VCALENDAR
ENDDATA