mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-07-26 12:49:35 +00:00
Updated / new regression tests.
This commit is contained in:
parent
005c7a2773
commit
c4541c56f0
@ -1,7 +1,7 @@
|
||||
HTTP/1.1 200 OK
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
DAV: 1, 2, access-control, calendar-access, calendar-schedule, extended-mkcol, calendar-proxy
|
||||
Content-Length: 10305
|
||||
Content-Length: 10307
|
||||
Etag: "735679d819034badbcddd8aa6029bc3d"
|
||||
Content-Type: text/calendar; charset="utf-8"
|
||||
|
||||
@ -9,7 +9,7 @@ BEGIN:VCALENDAR
|
||||
PRODID:-//davical.org//NONSGML AWL Calendar//EN
|
||||
VERSION:2.0
|
||||
CALSCALE:GREGORIAN
|
||||
X-WR-CALNAME:User One's Calendar
|
||||
X-WR-CALNAME:User 1's Calendaranza
|
||||
BEGIN:VEVENT
|
||||
DTSTAMP:20061102T090217Z
|
||||
DTSTART;TZID=New Zealand Standard Time:20061102T123000
|
||||
|
||||
@ -1,20 +1,21 @@
|
||||
HTTP/1.1 207 Multi-Status
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
DAV: 1, 2, access-control, calendar-access, calendar-schedule, extended-mkcol, calendar-proxy
|
||||
ETag: "bc08f49b27db6f752382addce09ec69b"
|
||||
Content-Length: 2053
|
||||
ETag: "c0a1811cd91f4f840744ddfb3da067a3"
|
||||
Content-Length: 2120
|
||||
Content-Type: text/xml; charset="utf-8"
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
|
||||
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:X="http://xmlns.comical.net/birds">
|
||||
<response>
|
||||
<href>/caldav.php/user1/home/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>User One's Calendar</displayname>
|
||||
<displayname>User 1's Calendaranza</displayname>
|
||||
<resourcetype>
|
||||
<collection/>
|
||||
<C:calendar/>
|
||||
<X:spotted-grebe/>
|
||||
</resourcetype>
|
||||
<supported-method-set>
|
||||
<supported-method name="OPTIONS"/>
|
||||
|
||||
22
testing/tests/regression-suite/972-BIND.result
Normal file
22
testing/tests/regression-suite/972-BIND.result
Normal file
@ -0,0 +1,22 @@
|
||||
HTTP/1.1 201 Created
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
DAV: 1, 2, access-control, calendar-access, calendar-schedule, extended-mkcol, calendar-proxy
|
||||
Location: /caldav.php/user4/user1/
|
||||
Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
bind_id: >1430<
|
||||
bound_source_id: >11<
|
||||
dav_displayname: >Updated Displayname with PROPPATCH<
|
||||
dav_name: >/user4/user2/<
|
||||
parent_container: >/user4/<
|
||||
ticket_id_length: >8<
|
||||
|
||||
bind_id: >1431<
|
||||
bound_source_id: >10<
|
||||
dav_displayname: >User 1's Calendaranza<
|
||||
dav_name: >/user4/user1/<
|
||||
parent_container: >/user4/<
|
||||
ticket_id_length: >8<
|
||||
|
||||
38
testing/tests/regression-suite/972-BIND.test
Normal file
38
testing/tests/regression-suite/972-BIND.test
Normal file
@ -0,0 +1,38 @@
|
||||
#
|
||||
# BIND a collection into an additional location
|
||||
# also applying a ticket during the bind
|
||||
#
|
||||
TYPE=BIND
|
||||
URL=http://regression.host/caldav.php/user4/
|
||||
AUTH=user4:user4
|
||||
|
||||
# Get the ticket we created earlier in 948...
|
||||
GETSQL=ticket
|
||||
SELECT ticket_id FROM access_ticket
|
||||
WHERE target_collection_id = 10 AND target_resource_id is null;
|
||||
ENDSQL
|
||||
|
||||
HEADER=User-Agent: Ticket Spec Tests
|
||||
HEADER=Content-Type: text/xml; charset="UTF-8"
|
||||
HEADER=Ticket: ##ticket##
|
||||
HEAD
|
||||
|
||||
|
||||
BEGINDATA
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<bind xmlns="DAV:">
|
||||
<segment>user1</segment>
|
||||
<href>/caldav.php/user1/home</href>
|
||||
</bind>
|
||||
ENDDATA
|
||||
|
||||
QUERY
|
||||
SELECT bind_id,
|
||||
bound_source_id,
|
||||
length(access_ticket_id) AS ticket_id_length,
|
||||
parent_container,
|
||||
dav_name,
|
||||
dav_displayname
|
||||
FROM dav_binding
|
||||
ENDQUERY
|
||||
|
||||
13
testing/tests/regression-suite/973-PUT-bound-succeed.result
Normal file
13
testing/tests/regression-suite/973-PUT-bound-succeed.result
Normal file
@ -0,0 +1,13 @@
|
||||
HTTP/1.1 201 Created
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
DAV: 1, 2, access-control, calendar-access, calendar-schedule, extended-mkcol, calendar-proxy
|
||||
ETag: "9a8d7696ee2e0a0f1f4170fe4f094a3a"
|
||||
Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
dav_etag: >9a8d7696ee2e0a0f1f4170fe4f094a3a<
|
||||
dav_name: >/user2/home/thiswillworkfine.ics<
|
||||
dtstart: >2010-03-22 18:00:00+13<
|
||||
summary: >Test adding an event to a bound collection<
|
||||
|
||||
55
testing/tests/regression-suite/973-PUT-bound-succeed.test
Normal file
55
testing/tests/regression-suite/973-PUT-bound-succeed.test
Normal file
@ -0,0 +1,55 @@
|
||||
#
|
||||
# Attempt to put an event into a bound location, where
|
||||
# the binding does confer write privileges
|
||||
#
|
||||
TYPE=PUT
|
||||
URL=http://regression.host/caldav.php/user4/user2/thiswillworkfine.ics
|
||||
|
||||
HEADER=Content-Type: text/calendar; charset=utf-8
|
||||
AUTH=user4:user4
|
||||
HEAD
|
||||
|
||||
BEGINDATA
|
||||
BEGIN:VCALENDAR
|
||||
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
|
||||
VERSION:2.0
|
||||
BEGIN:VTIMEZONE
|
||||
TZID:Pacific/Auckland
|
||||
X-LIC-LOCATION:Pacific/Auckland
|
||||
BEGIN:DAYLIGHT
|
||||
TZOFFSETFROM:+1200
|
||||
TZOFFSETTO:+1300
|
||||
TZNAME:NZDT
|
||||
DTSTART:19700927T020000
|
||||
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=9
|
||||
END:DAYLIGHT
|
||||
BEGIN:STANDARD
|
||||
TZOFFSETFROM:+1300
|
||||
TZOFFSETTO:+1200
|
||||
TZNAME:NZST
|
||||
DTSTART:19700405T030000
|
||||
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
|
||||
END:STANDARD
|
||||
END:VTIMEZONE
|
||||
BEGIN:VEVENT
|
||||
CREATED:20100318T044409Z
|
||||
LAST-MODIFIED:20100318T044451Z
|
||||
DTSTAMP:20100318T044451Z
|
||||
UID:9f81cd8a-b1c2-4f72-9f12-1ddbddd69342
|
||||
SUMMARY:Test adding an event to a bound collection
|
||||
RRULE:FREQ=WEEKLY;INTERVAL=2
|
||||
DTSTART;TZID=Pacific/Auckland:20100322T180000
|
||||
DTEND;TZID=Pacific/Auckland:20100322T190000
|
||||
LOCATION:Somewhere else
|
||||
DESCRIPTION:This event is being added to a bound collection.
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
ENDDATA
|
||||
|
||||
QUERY
|
||||
SELECT caldav_data.dav_name, caldav_data.dav_etag, dtstart, summary
|
||||
FROM caldav_data JOIN calendar_item USING(dav_name)
|
||||
WHERE caldav_data.dav_name ~ '/user2/.*thiswill'
|
||||
ENDQUERY
|
||||
|
||||
|
||||
7
testing/tests/regression-suite/974-PUT-bound-fail.result
Normal file
7
testing/tests/regression-suite/974-PUT-bound-fail.result
Normal file
@ -0,0 +1,7 @@
|
||||
HTTP/1.1 403 Forbidden
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
DAV: 1, 2, access-control, calendar-access, calendar-schedule, extended-mkcol, calendar-proxy
|
||||
Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
55
testing/tests/regression-suite/974-PUT-bound-fail.test
Normal file
55
testing/tests/regression-suite/974-PUT-bound-fail.test
Normal file
@ -0,0 +1,55 @@
|
||||
#
|
||||
# Attempt to put an event into a bound location, where
|
||||
# the binding does not confer write privileges
|
||||
#
|
||||
TYPE=PUT
|
||||
URL=http://regression.host/caldav.php/user4/user1/thiswillnotwork.ics
|
||||
|
||||
HEADER=Content-Type: text/calendar; charset=utf-8
|
||||
AUTH=user4:user4
|
||||
HEAD
|
||||
|
||||
BEGINDATA
|
||||
BEGIN:VCALENDAR
|
||||
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
|
||||
VERSION:2.0
|
||||
BEGIN:VTIMEZONE
|
||||
TZID:Pacific/Auckland
|
||||
X-LIC-LOCATION:Pacific/Auckland
|
||||
BEGIN:DAYLIGHT
|
||||
TZOFFSETFROM:+1200
|
||||
TZOFFSETTO:+1300
|
||||
TZNAME:NZDT
|
||||
DTSTART:19700927T020000
|
||||
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=9
|
||||
END:DAYLIGHT
|
||||
BEGIN:STANDARD
|
||||
TZOFFSETFROM:+1300
|
||||
TZOFFSETTO:+1200
|
||||
TZNAME:NZST
|
||||
DTSTART:19700405T030000
|
||||
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
|
||||
END:STANDARD
|
||||
END:VTIMEZONE
|
||||
BEGIN:VEVENT
|
||||
CREATED:20100318T044409Z
|
||||
LAST-MODIFIED:20100318T044451Z
|
||||
DTSTAMP:20100318T044451Z
|
||||
UID:9f81cd8a-b1c2-4f72-9f12-1ddbddd69342
|
||||
SUMMARY:Test adding an event to a bound collection
|
||||
RRULE:FREQ=WEEKLY;INTERVAL=2
|
||||
DTSTART;TZID=Pacific/Auckland:20100322T180000
|
||||
DTEND;TZID=Pacific/Auckland:20100322T190000
|
||||
LOCATION:Somewhere else
|
||||
DESCRIPTION:This event is being added to a bound collection.
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
ENDDATA
|
||||
|
||||
QUERY
|
||||
SELECT caldav_data.dav_name, caldav_data.dav_etag, dtstart, summary
|
||||
FROM caldav_data JOIN calendar_item USING(dav_name)
|
||||
WHERE caldav_data.dav_name ~ '/user1/.*willnotwork.ics'
|
||||
ENDQUERY
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user