mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-03-13 08:00:15 +00:00
Add tests for AWLs "Fix: GetProperties must treat property names as case-insensitive"
This commit is contained in:
parent
a1395eae0f
commit
56dc373a71
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:" xmlns:VC="urn:ietf:params:xml:ns:carddav">
|
||||
<response>
|
||||
<href>/caldav.php/user5/addresses/sabre-vobject-41956788-1273-449e-bfb7-716850c91ec6.vcf</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<getetag>some valid etag</getetag>
|
||||
<VC:address-data>BEGIN:VCARD
|
||||
VERSION:4.0
|
||||
PRODID:-//Sabre//Sabre VObject 4.3.3//EN
|
||||
UID:sabre-vobject-41956788-1273-449e-bfb7-716850c91ec6
|
||||
FN:CardDavClient Test879489908
|
||||
N:Test879489908;CardDavClient;;;
|
||||
NICKNAME:Jonny2
|
||||
TEL;TYPE=HOME:12345
|
||||
TEL:555
|
||||
REV:date
|
||||
END:VCARD
|
||||
</VC:address-data>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
@ -0,0 +1,34 @@
|
||||
#
|
||||
# Test for nonexistence of a lowercase property, which must treated
|
||||
# cases-insensitively (hence EMAIL must not match)
|
||||
#
|
||||
# (only Jonny2 does not have EMAIL)
|
||||
#
|
||||
TYPE=REPORT
|
||||
URL=http://regression.host/caldav.php/user5/addresses/
|
||||
|
||||
HEADER=Accept: text/xml,application/xml
|
||||
HEADER=Content-Type: text/xml
|
||||
HEADER=Depth: 1
|
||||
|
||||
AUTH=user5:user5
|
||||
|
||||
# HEAD
|
||||
|
||||
BEGINDATA
|
||||
<?xml version="1.0"?>
|
||||
<CARDDAV:addressbook-query xmlns:DAV="DAV:" xmlns:CARDDAV="urn:ietf:params:xml:ns:carddav" xmlns:CS="http://calendarserver.org/ns/">
|
||||
<DAV:prop>
|
||||
<DAV:getetag/>
|
||||
<CARDDAV:address-data/>
|
||||
</DAV:prop>
|
||||
<CARDDAV:filter test="anyof">
|
||||
<CARDDAV:prop-filter name="email" test="anyof">
|
||||
<CARDDAV:is-not-defined/>
|
||||
</CARDDAV:prop-filter>
|
||||
</CARDDAV:filter>
|
||||
</CARDDAV:addressbook-query>
|
||||
ENDDATA
|
||||
|
||||
REPLACE=_<getetag>"[0-9a-f]+"</getetag>_<getetag>some valid etag</getetag>_
|
||||
REPLACE=/^REV:.*$/REV:date/
|
||||
@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:" xmlns:VC="urn:ietf:params:xml:ns:carddav">
|
||||
<response>
|
||||
<href>/caldav.php/user5/addresses/sabre-vobject-131cdf91-5460-423b-a836-e420e5affe13.vcf</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<getetag>some valid etag</getetag>
|
||||
<VC:address-data>BEGIN:VCARD
|
||||
VERSION:4.0
|
||||
PRODID:-//Sabre//Sabre VObject 4.3.3//EN
|
||||
UID:sabre-vobject-131cdf91-5460-423b-a836-e420e5affe13
|
||||
FN:CardDavClient Test212420682
|
||||
N:Test212420682;CardDavClient;;;
|
||||
NICKNAME:Jonny0
|
||||
EMAIL;TYPE=HOME:john6doe@example.com
|
||||
EMAIL;TYPE=WORK:doe6@example.com
|
||||
X-CUSTOMPROP;X-CUSTOMPARAM=WORK:foobar
|
||||
REV:date
|
||||
END:VCARD
|
||||
</VC:address-data>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user5/addresses/sabre-vobject-8121cd7a-8251-4b74-a952-ca91fdc21e36.vcf</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<getetag>some valid etag</getetag>
|
||||
<VC:address-data>BEGIN:VCARD
|
||||
VERSION:4.0
|
||||
PRODID:-//Sabre//Sabre VObject 4.3.3//EN
|
||||
UID:sabre-vobject-8121cd7a-8251-4b74-a952-ca91fdc21e36
|
||||
FN:CardDavClient Test913043917
|
||||
N:Test913043917;CardDavClient;;;
|
||||
NICKNAME:Jonny1
|
||||
EMAIL:maxmu@abcd.com
|
||||
X-CUSTOMPROP;X-CUSTOMPARAM=HOME,WORK:foobar
|
||||
REV:date
|
||||
END:VCARD
|
||||
</VC:address-data>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user5/addresses/sabre-vobject-34cd55a8-330f-47cd-8b69-6fbd16a0880b.vcf</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<getetag>some valid etag</getetag>
|
||||
<VC:address-data>BEGIN:VCARD
|
||||
VERSION:4.0
|
||||
PRODID:-//Sabre//Sabre VObject 4.3.3//EN
|
||||
UID:sabre-vobject-34cd55a8-330f-47cd-8b69-6fbd16a0880b
|
||||
FN:CardDavClient Test1520108081
|
||||
N:Test1520108081;CardDavClient;;;
|
||||
NICKNAME:Jonny3
|
||||
ITEM1.EMAIL:foo@ex.com
|
||||
ITEM1.X-ABLABEL:CustomLabel
|
||||
IMPP;X-SERVICE-TYPE=Jabber;TYPE=HOME:xmpp:foo@example.com
|
||||
REV:date
|
||||
END:VCARD
|
||||
</VC:address-data>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
@ -0,0 +1,32 @@
|
||||
#
|
||||
# This is the inverse of 2054, we request a REPORT for (lowercase)
|
||||
# property 'email' and expect all three results containing EMAIL
|
||||
#
|
||||
# (Jonny0, Jonny1 and Jonny3 should be returned)
|
||||
#
|
||||
TYPE=REPORT
|
||||
URL=http://regression.host/caldav.php/user5/addresses/
|
||||
|
||||
HEADER=Accept: text/xml,application/xml
|
||||
HEADER=Content-Type: text/xml
|
||||
HEADER=Depth: 1
|
||||
|
||||
AUTH=user5:user5
|
||||
|
||||
# HEAD
|
||||
|
||||
BEGINDATA
|
||||
<?xml version="1.0"?>
|
||||
<CARDDAV:addressbook-query xmlns:DAV="DAV:" xmlns:CARDDAV="urn:ietf:params:xml:ns:carddav" xmlns:CS="http://calendarserver.org/ns/">
|
||||
<DAV:prop>
|
||||
<DAV:getetag/>
|
||||
<CARDDAV:address-data/>
|
||||
</DAV:prop>
|
||||
<CARDDAV:filter test="anyof">
|
||||
<CARDDAV:prop-filter name="email" test="anyof"/>
|
||||
</CARDDAV:filter>
|
||||
</CARDDAV:addressbook-query>
|
||||
ENDDATA
|
||||
|
||||
REPLACE=_<getetag>"[0-9a-f]+"</getetag>_<getetag>some valid etag</getetag>_
|
||||
REPLACE=/^REV:.*$/REV:date/
|
||||
Loading…
x
Reference in New Issue
Block a user