mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-07-26 12:49:35 +00:00
Regression tests for PROPPATCH on bound collection.
This commit is contained in:
parent
7ac1adb697
commit
f78bed7a3e
16
testing/tests/regression-suite/970-PROPPATCH-bound.result
Normal file
16
testing/tests/regression-suite/970-PROPPATCH-bound.result
Normal file
@ -0,0 +1,16 @@
|
||||
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: 225
|
||||
Content-Type: text/xml; charset="utf-8"
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:">
|
||||
<response>
|
||||
<href>/caldav.php/user4/user2/</href>
|
||||
<responsedescription>All requested changes were made.</responsedescription>
|
||||
</response>
|
||||
</multistatus>
|
||||
|
||||
dav_displayname: >Updated Displayname with PROPPATCH<
|
||||
|
||||
26
testing/tests/regression-suite/970-PROPPATCH-bound.test
Normal file
26
testing/tests/regression-suite/970-PROPPATCH-bound.test
Normal file
@ -0,0 +1,26 @@
|
||||
#
|
||||
# Test PROPPATCH to change the displayname on a bind
|
||||
#
|
||||
TYPE=PROPPATCH
|
||||
URL=http://regression.host/caldav.php/user4/user2/
|
||||
AUTH=user4:user4
|
||||
|
||||
HEADER=User-Agent: DAViCalTester/public
|
||||
HEADER=Content-Type: text/xml; charset="UTF-8"
|
||||
HEAD
|
||||
|
||||
|
||||
BEGINDATA
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<propertyupdate xmlns="DAV:">
|
||||
<set>
|
||||
<prop>
|
||||
<displayname>Updated Displayname with PROPPATCH</displayname>
|
||||
</prop>
|
||||
</set>
|
||||
</propertyupdate>
|
||||
ENDDATA
|
||||
|
||||
QUERY
|
||||
SELECT dav_displayname FROM dav_binding WHERE dav_name = '/user4/user2/'
|
||||
ENDQUERY
|
||||
@ -0,0 +1,33 @@
|
||||
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
|
||||
Content-Length: 623
|
||||
Content-Type: text/xml; charset="utf-8"
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:">
|
||||
<response>
|
||||
<href>/caldav.php/user4/user2/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<urn:ietf:params:xml:ns:caldav:calendar-timezone/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 403 Forbidden</status>
|
||||
<responsedescription>
|
||||
<error>
|
||||
<cannot-modify-protected-property/>
|
||||
</error>
|
||||
</responsedescription>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<DAV::displayname/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 424 Failed Dependency</status>
|
||||
</propstat>
|
||||
<responsedescription>Some properties were not able to be changed.</responsedescription>
|
||||
</response>
|
||||
</multistatus>
|
||||
|
||||
dav_displayname: >Updated Displayname with PROPPATCH<
|
||||
|
||||
27
testing/tests/regression-suite/971-PROPPATCH-bound-fail.test
Normal file
27
testing/tests/regression-suite/971-PROPPATCH-bound-fail.test
Normal file
@ -0,0 +1,27 @@
|
||||
#
|
||||
# Test PROPPATCH to change the displayname on a bind
|
||||
#
|
||||
TYPE=PROPPATCH
|
||||
URL=http://regression.host/caldav.php/user4/user2/
|
||||
AUTH=user4:user4
|
||||
|
||||
HEADER=User-Agent: DAViCalTester/public
|
||||
HEADER=Content-Type: text/xml; charset="UTF-8"
|
||||
HEAD
|
||||
|
||||
|
||||
BEGINDATA
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<propertyupdate xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
|
||||
<set>
|
||||
<prop>
|
||||
<displayname>Again set displayname with PROPPATCH</displayname>
|
||||
<C:calendar-timezone>Updated Displayname with PROPPATCH</C:calendar-timezone>
|
||||
</prop>
|
||||
</set>
|
||||
</propertyupdate>
|
||||
ENDDATA
|
||||
|
||||
QUERY
|
||||
SELECT dav_displayname FROM dav_binding WHERE dav_name = '/user4/user2/'
|
||||
ENDQUERY
|
||||
Loading…
x
Reference in New Issue
Block a user