mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-19 01:34:26 +00:00
Some initial regression tests and results for PROPPATCH.
This commit is contained in:
parent
d75bccb4bc
commit
fc0d34eac7
13
testing/tests/regression-suite/840-Spec-PROPPATCH-1.result
Normal file
13
testing/tests/regression-suite/840-Spec-PROPPATCH-1.result
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
HTTP/1.1 200 OK
|
||||||
|
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||||
|
Content-Length: 239
|
||||||
|
Content-Type: text/xml; charset="utf-8"
|
||||||
|
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<multistatus xmlns="DAV:">
|
||||||
|
<response>
|
||||||
|
<href>http://mycaldav/caldav.php/user1/home/</href>
|
||||||
|
<responsedescription>All requested changes were made.</responsedescription>
|
||||||
|
</response>
|
||||||
|
</multistatus>
|
||||||
|
User One's Calendar --- faf25336de0e470a54075c14cbcf5272 --- 0 --- 1
|
||||||
38
testing/tests/regression-suite/840-Spec-PROPPATCH-1.test
Normal file
38
testing/tests/regression-suite/840-Spec-PROPPATCH-1.test
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
#
|
||||||
|
# Check for support of PROPPATCH method
|
||||||
|
#
|
||||||
|
# Adding the 'owner' property to a collection
|
||||||
|
#
|
||||||
|
TYPE=PROPPATCH
|
||||||
|
URL=http://mycaldav/caldav.php/user1/home/
|
||||||
|
HEADER=User-agent: SpecTest PROPPATCH
|
||||||
|
HEADER=Content-type: text/xml
|
||||||
|
HEAD
|
||||||
|
|
||||||
|
BEGINDATA
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<propertyupdate xmlns="DAV:" xmlns:X="urn:mcmillan:bogus:xml:ns:rscds">
|
||||||
|
<set>
|
||||||
|
<prop>
|
||||||
|
<owner>
|
||||||
|
<href>http://www.example.com/acl/users/jim</href>
|
||||||
|
</owner>
|
||||||
|
<X:arbitrary>A completely bogus property which should be saved.</X:arbitrary>
|
||||||
|
<displayname>User One's Calendar</displayname>
|
||||||
|
</prop>
|
||||||
|
</set>
|
||||||
|
<remove>
|
||||||
|
<prop>
|
||||||
|
<resourcetype>
|
||||||
|
<calendar xmlns="urn:ietf:params:xml:ns:caldav"/>
|
||||||
|
</resourcetype>
|
||||||
|
</prop>
|
||||||
|
</remove>
|
||||||
|
</propertyupdate>
|
||||||
|
ENDDATA
|
||||||
|
|
||||||
|
QUERY
|
||||||
|
SELECT dav_displayname, dav_etag, is_calendar,
|
||||||
|
modified > (current_timestamp - '5 seconds'::interval) AS changed_last_5secs
|
||||||
|
FROM collection WHERE dav_name = '/user1/home/';
|
||||||
|
ENDQUERY
|
||||||
13
testing/tests/regression-suite/841-Spec-PROPPATCH-2.result
Normal file
13
testing/tests/regression-suite/841-Spec-PROPPATCH-2.result
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
HTTP/1.1 200 OK
|
||||||
|
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||||
|
Content-Length: 239
|
||||||
|
Content-Type: text/xml; charset="utf-8"
|
||||||
|
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<multistatus xmlns="DAV:">
|
||||||
|
<response>
|
||||||
|
<href>http://mycaldav/caldav.php/user1/home/</href>
|
||||||
|
<responsedescription>All requested changes were made.</responsedescription>
|
||||||
|
</response>
|
||||||
|
</multistatus>
|
||||||
|
User One's Calendar --- faf25336de0e470a54075c14cbcf5272 --- 1 --- 1
|
||||||
38
testing/tests/regression-suite/841-Spec-PROPPATCH-2.test
Normal file
38
testing/tests/regression-suite/841-Spec-PROPPATCH-2.test
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
#
|
||||||
|
# Check for support of PROPPATCH method
|
||||||
|
#
|
||||||
|
# Convert the collection back to a calendar, change the displayname
|
||||||
|
# again, and remove the owner property.
|
||||||
|
#
|
||||||
|
TYPE=PROPPATCH
|
||||||
|
URL=http://mycaldav/caldav.php/user1/home/
|
||||||
|
HEADER=User-agent: SpecTest PROPPATCH
|
||||||
|
HEADER=Content-type: text/xml
|
||||||
|
HEAD
|
||||||
|
|
||||||
|
BEGINDATA
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<propertyupdate xmlns="DAV:">
|
||||||
|
<set>
|
||||||
|
<prop>
|
||||||
|
<owner/>
|
||||||
|
<resourcetype>
|
||||||
|
<collection/>
|
||||||
|
<calendar xmlns="urn:ietf:params:xml:ns:caldav"/>
|
||||||
|
</resourcetype>
|
||||||
|
<displayname>User One's Calendar</displayname>
|
||||||
|
</prop>
|
||||||
|
</set>
|
||||||
|
<remove>
|
||||||
|
<prop>
|
||||||
|
<owner/>
|
||||||
|
</prop>
|
||||||
|
</remove>
|
||||||
|
</propertyupdate>
|
||||||
|
ENDDATA
|
||||||
|
|
||||||
|
QUERY
|
||||||
|
SELECT dav_displayname, dav_etag, is_calendar,
|
||||||
|
modified > (current_timestamp - '5 seconds'::interval) AS changed_last_5secs
|
||||||
|
FROM collection WHERE dav_name = '/user1/home/';
|
||||||
|
ENDQUERY
|
||||||
13
testing/tests/regression-suite/842-Spec-PROPPATCH-3.result
Normal file
13
testing/tests/regression-suite/842-Spec-PROPPATCH-3.result
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
HTTP/1.1 207 Multi-Status
|
||||||
|
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||||
|
Content-Length: 251
|
||||||
|
Content-Type: text/xml; charset="utf-8"
|
||||||
|
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<multistatus xmlns="DAV:">
|
||||||
|
<response>
|
||||||
|
<href>http://mycaldav/caldav.php/user1/home/</href>
|
||||||
|
<responsedescription>Some properties were not able to be changed.</responsedescription>
|
||||||
|
</response>
|
||||||
|
</multistatus>
|
||||||
|
User One's Calendar --- faf25336de0e470a54075c14cbcf5272 --- 1 --- 0
|
||||||
29
testing/tests/regression-suite/842-Spec-PROPPATCH-3.test
Normal file
29
testing/tests/regression-suite/842-Spec-PROPPATCH-3.test
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#
|
||||||
|
# Check for support of PROPPATCH method
|
||||||
|
#
|
||||||
|
# An attempt to remove the collection resourcetype should fail.
|
||||||
|
#
|
||||||
|
TYPE=PROPPATCH
|
||||||
|
URL=http://mycaldav/caldav.php/user1/home/
|
||||||
|
HEADER=User-agent: SpecTest PROPPATCH
|
||||||
|
HEADER=Content-type: text/xml
|
||||||
|
HEAD
|
||||||
|
|
||||||
|
BEGINDATA
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<propertyupdate xmlns="DAV:">
|
||||||
|
<remove>
|
||||||
|
<prop>
|
||||||
|
<resourcetype>
|
||||||
|
<collection/>
|
||||||
|
</resourcetype>
|
||||||
|
</prop>
|
||||||
|
</remove>
|
||||||
|
</propertyupdate>
|
||||||
|
ENDDATA
|
||||||
|
|
||||||
|
QUERY
|
||||||
|
SELECT dav_displayname, dav_etag, is_calendar,
|
||||||
|
modified > (current_timestamp - '5 seconds'::interval) AS changed_last_5secs
|
||||||
|
FROM collection WHERE dav_name = '/user1/home/';
|
||||||
|
ENDQUERY
|
||||||
Loading…
x
Reference in New Issue
Block a user