mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-22 02:04:19 +00:00
First swathe of regression tests for CardDAV stuff.
This commit is contained in:
parent
8fd7253e8b
commit
870b8b56f4
2
testing/tests/carddav/.gitignore
vendored
Normal file
2
testing/tests/carddav/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
diffs
|
||||
results
|
||||
16
testing/tests/carddav/2000-MKCOL-addressbook.result
Normal file
16
testing/tests/carddav/2000-MKCOL-addressbook.result
Normal file
@ -0,0 +1,16 @@
|
||||
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, bind, calendar-auto-schedule
|
||||
Cache-Control: no-cache
|
||||
Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
dav_displayname: >User 1's Addresses<
|
||||
is_addressbook: >1<
|
||||
is_calendar: >0<
|
||||
parent_container: >/user1/<
|
||||
public_events_onl: >0<
|
||||
resourcetypes: ><DAV::collection/><urn:ietf:params:xml:ns:carddav:addressbook/><
|
||||
user_no: >10<
|
||||
|
||||
34
testing/tests/carddav/2000-MKCOL-addressbook.test
Normal file
34
testing/tests/carddav/2000-MKCOL-addressbook.test
Normal file
@ -0,0 +1,34 @@
|
||||
#
|
||||
# Extended MKCOL test - create an addressbook
|
||||
#
|
||||
TYPE=MKCOL
|
||||
URL=http://mycaldav/caldav.php/user1/addressbook/
|
||||
HEADER=User-Agent: DAViCalTester/public
|
||||
HEADER=Content-Type: text/xml
|
||||
HEAD
|
||||
|
||||
|
||||
BEGINDATA
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<mkcol xmlns="DAV:" xmlns:CARD="urn:ietf:params:xml:ns:carddav">
|
||||
<set>
|
||||
<prop>
|
||||
<resourcetype>
|
||||
<collection/>
|
||||
<CARD:addressbook/>
|
||||
</resourcetype>
|
||||
<displayname>User 1's Addresses</displayname>
|
||||
</prop>
|
||||
</set>
|
||||
</mkcol>
|
||||
ENDDATA
|
||||
|
||||
|
||||
QUERY
|
||||
SELECT user_no, parent_container, dav_displayname,
|
||||
is_calendar, public_events_only, is_addressbook,
|
||||
resourcetypes
|
||||
FROM collection
|
||||
WHERE dav_name = '/user1/addressbook/';
|
||||
ENDQUERY
|
||||
|
||||
7
testing/tests/carddav/2001-PUT-fail.result
Normal file
7
testing/tests/carddav/2001-PUT-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, bind, calendar-auto-schedule
|
||||
Content-Length: 91
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
PUT on a collection is only allowed for text/calendar content against a calendar collection
|
||||
33
testing/tests/carddav/2001-PUT-fail.test
Normal file
33
testing/tests/carddav/2001-PUT-fail.test
Normal file
@ -0,0 +1,33 @@
|
||||
#
|
||||
# PUT a VCARD record into an addressbook
|
||||
#
|
||||
TYPE=PUT
|
||||
URL=http://regression.host/caldav.php/user1/addressbook/
|
||||
|
||||
HEADER=User-Agent: DAViCalTester/public
|
||||
HEADER=Content-Type: text/vcard; charset=utf-8
|
||||
HEAD
|
||||
|
||||
BEGINDATA
|
||||
begin:vcard
|
||||
fn:Donald Kelly
|
||||
n:Kelly;Donald
|
||||
org:Esposo Designs Ltd
|
||||
adr:Newtown;;25 Rintoul St;Wellington;;;New Zealand
|
||||
email;internet:donald@example.co.nz
|
||||
title:Proprietor
|
||||
tel;work:+64 4 347 4747
|
||||
tel;cell:+64 2 1234-4321
|
||||
x-mozilla-html:TRUE
|
||||
url:www.example.co.nz
|
||||
version:2.1
|
||||
end:vcard
|
||||
ENDDATA
|
||||
|
||||
QUERY
|
||||
SELECT caldav_data.dav_name, caldav_data.dav_etag, fn, n
|
||||
FROM caldav_data JOIN addressbook_resource USING(dav_id)
|
||||
WHERE caldav_data.dav_name ~ '/user1/addressbook/'
|
||||
ENDQUERY
|
||||
|
||||
|
||||
10
testing/tests/carddav/2002-PUT-arbitrary.result
Normal file
10
testing/tests/carddav/2002-PUT-arbitrary.result
Normal file
@ -0,0 +1,10 @@
|
||||
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, bind, calendar-auto-schedule
|
||||
Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
dav_etag: >2ab202068a7ff020052f3d8bef7abc91<
|
||||
dav_name: >/user1/addressbook/strumar_and_beren.txt<
|
||||
|
||||
24
testing/tests/carddav/2002-PUT-arbitrary.test
Normal file
24
testing/tests/carddav/2002-PUT-arbitrary.test
Normal file
@ -0,0 +1,24 @@
|
||||
#
|
||||
# PUT arbitrary text into a collection (in this case an addressbook)
|
||||
#
|
||||
TYPE=PUT
|
||||
URL=http://regression.host/caldav.php/user1/addressbook/strumar_and_beren.txt
|
||||
|
||||
HEADER=User-Agent: DAViCalTester/public
|
||||
HEADER=Content-Type: text/plain; charset=utf-8
|
||||
HEAD
|
||||
|
||||
BEGINDATA
|
||||
Once upon a time there was an old, old man who lived with a great
|
||||
white wolf. As is often the habit with men, he had not always been
|
||||
quite as old as he was now, and Beren had not always been this white,
|
||||
either.
|
||||
ENDDATA
|
||||
|
||||
QUERY
|
||||
SELECT caldav_data.dav_name, caldav_data.dav_etag
|
||||
FROM caldav_data
|
||||
WHERE caldav_data.dav_name ~ '/user1/addressbook/'
|
||||
ENDQUERY
|
||||
|
||||
|
||||
48
testing/tests/carddav/2003-PUT-vcard.result
Normal file
48
testing/tests/carddav/2003-PUT-vcard.result
Normal file
@ -0,0 +1,48 @@
|
||||
HTTP/1.1 100 Continue
|
||||
|
||||
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, bind, calendar-auto-schedule
|
||||
Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
caladruri: >mailto:andrew@morphoss.com<
|
||||
caluri: >https://dotcal.com/karora<
|
||||
dav_etag: >0e12d26afe2e96308cba4e68ad02ed96<
|
||||
dav_name: >/user1/addressbook/andrew_mcmillan.vcf<
|
||||
fburl: >https://davical.morphoss.com/freebusy.php/andrew@morphoss.com<
|
||||
fn: >Andrew Watson McMillan<
|
||||
n: >McMillan;Andrew;Watson;;<
|
||||
nickname: >karora<
|
||||
note: >Primary author of DAViCal CalDAV Server.<
|
||||
org: >dotCal;;Porirua<
|
||||
uid: >pas-id-4BB0719600000000<
|
||||
url: >http://andrew.mcmillan.net.nz/<
|
||||
version: >3.0<
|
||||
|
||||
box_no: ><
|
||||
country: >New Zealand<
|
||||
locality: >Porikana<
|
||||
postcode: >4173<
|
||||
property: >ADR;TYPE=HOME:;;16 Kaka Place;Porikana;;4173;New Zealand<
|
||||
region: ><
|
||||
street_address: >16 Kaka Place<
|
||||
type: >HOME<
|
||||
unit_no: ><
|
||||
|
||||
tel: >+64 22 123 4567<
|
||||
type: >WORK,VOICE<
|
||||
|
||||
tel: >+64 4 123 4567<
|
||||
type: >HOME,VOICE<
|
||||
|
||||
tel: >+64 22 123 4567<
|
||||
type: >CELL<
|
||||
|
||||
email: >andrew@morphoss.com<
|
||||
type: >WORK<
|
||||
|
||||
email: >andrew@mcmillan.net.nz<
|
||||
type: >HOME<
|
||||
|
||||
118
testing/tests/carddav/2003-PUT-vcard.test
Normal file
118
testing/tests/carddav/2003-PUT-vcard.test
Normal file
@ -0,0 +1,118 @@
|
||||
#
|
||||
# PUT a VCARD record into an addressbook
|
||||
#
|
||||
TYPE=PUT
|
||||
URL=http://regression.host/caldav.php/user1/addressbook/andrew_mcmillan.vcf
|
||||
|
||||
HEADER=User-Agent: DAViCalTester/public
|
||||
HEADER=Content-Type: text/vcard; charset=utf-8
|
||||
HEAD
|
||||
|
||||
BEGINDATA
|
||||
BEGIN:VCARD
|
||||
VERSION:3.0
|
||||
REV:2010-03-29T09:23:34Z
|
||||
UID:pas-id-4BB0719600000000
|
||||
X-SKYPE;X-EVOLUTION-UI-SLOT=1;TYPE=HOME:karora__
|
||||
X-JABBER;X-EVOLUTION-UI-SLOT=3;TYPE=HOME:karora@irc.oftc.net
|
||||
TEL;X-EVOLUTION-UI-SLOT=3;TYPE=CELL:+64 22 123 4567
|
||||
TEL;X-EVOLUTION-UI-SLOT=2;TYPE=HOME,VOICE:+64 4 123 4567
|
||||
TEL;X-EVOLUTION-UI-SLOT=1;TYPE=WORK,VOICE:+64 22 123 4567
|
||||
EMAIL;X-EVOLUTION-UI-SLOT=2;TYPE=HOME:andrew@mcmillan.net.nz
|
||||
EMAIL;X-EVOLUTION-UI-SLOT=1;TYPE=WORK:andrew@morphoss.com
|
||||
PHOTO;ENCODING=b;TYPE="X-EVOLUTION-UNKNOWN":/9j/4AAQSkZJRgABAQEASABIAAD//gA
|
||||
RQW5kcmV3IE1jTWlsbGFu/9sAQwAEAwMDAwIEAwMDBAQEBQYKBgYFBQYMCAkHCg4MDw4ODA0ND
|
||||
xEWEw8QFRENDRMaExUXGBkZGQ8SGx0bGB0WGBkY/9sAQwEEBAQGBQYLBgYLGBANEBgYGBgYGBg
|
||||
YGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgY/8AAEQgAQABAAwEiA
|
||||
AIRAQMRAf/EABwAAAICAwEBAAAAAAAAAAAAAAcIBQYCAwQBCf/EADoQAAEDAgUBBQYEAwkAAAA
|
||||
AAAECAwQFEQAGEiExBxNBUWGBCBQVInGRYrHB0SMyoRYXJEJSgpLh8f/EABoBAAIDAQEAAAAAA
|
||||
AAAAAAAAAQFAAEDAgb/xAAjEQACAgIBBAIDAAAAAAAAAAABAgARAwQhEhMxQQUiMlHh/9o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Hqc7Lmwfc//Z
|
||||
LABEL;TYPE=HOME:16 Kaka Place\nPorikana\n4173\nNew Zealand
|
||||
ADR;TYPE=HOME:;;16 Kaka Place;Porikana;;4173;New Zealand
|
||||
X-MOZILLA-HTML:FALSE
|
||||
X-EVOLUTION-VIDEO-URL:
|
||||
FBURL:https://davical.morphoss.com/freebusy.php/andrew@morphoss.com
|
||||
CALADRURI:mailto:andrew@morphoss.com
|
||||
CALURI:https://dotcal.com/karora
|
||||
X-EVOLUTION-BLOG-URL:http://andrew.mcmillan.net.nz/
|
||||
CATEGORIES:Developer,Personal,Debian,
|
||||
X-EVOLUTION-FILE-AS:McMillan\, Andrew
|
||||
N:McMillan;Andrew;Watson;;
|
||||
FN:Andrew Watson McMillan
|
||||
NOTE:Primary author of DAViCal CalDAV Server.
|
||||
X-EVOLUTION-SPOUSE:Heather Buchanan
|
||||
X-EVOLUTION-ANNIVERSARY:1989-04-22
|
||||
BDAY:1958-07-26
|
||||
NICKNAME:karora
|
||||
X-EVOLUTION-ASSISTANT:
|
||||
X-EVOLUTION-MANAGER:
|
||||
ROLE:Geek
|
||||
ORG:dotCal;;Porirua
|
||||
TITLE:Chief Technology Officer
|
||||
URL:http://andrew.mcmillan.net.nz/
|
||||
END:VCARD
|
||||
ENDDATA
|
||||
|
||||
QUERY
|
||||
SELECT caldav_data.dav_name, caldav_data.dav_etag,
|
||||
version, uid, nickname, fn, n, note, org, url, fburl, caladruri, caluri
|
||||
FROM caldav_data LEFT JOIN addressbook_resource USING(dav_id)
|
||||
WHERE caldav_data.dav_name ~ '/user1/addressbook/andrew_mcmillan.vcf'
|
||||
ENDQUERY
|
||||
|
||||
QUERY
|
||||
SELECT
|
||||
type, box_no, unit_no, street_address, locality, region, postcode, country, property
|
||||
FROM caldav_data
|
||||
LEFT JOIN addressbook_address_adr USING(dav_id)
|
||||
WHERE caldav_data.dav_name ~ '/user1/addressbook/andrew_mcmillan.vcf'
|
||||
ORDER BY dav_id, property
|
||||
ENDQUERY
|
||||
|
||||
QUERY
|
||||
SELECT
|
||||
addressbook_address_tel.type, addressbook_address_tel.tel
|
||||
FROM caldav_data
|
||||
LEFT JOIN addressbook_address_tel USING(dav_id)
|
||||
WHERE caldav_data.dav_name ~ '/user1/addressbook/andrew_mcmillan.vcf'
|
||||
ORDER BY dav_id, property
|
||||
ENDQUERY
|
||||
|
||||
QUERY
|
||||
SELECT
|
||||
addressbook_address_email.type, addressbook_address_email.email
|
||||
FROM caldav_data
|
||||
LEFT JOIN addressbook_address_email USING(dav_id)
|
||||
WHERE caldav_data.dav_name ~ '/user1/addressbook/andrew_mcmillan.vcf'
|
||||
ORDER BY dav_id, property
|
||||
ENDQUERY
|
||||
|
||||
|
||||
7
testing/tests/carddav/2004-PUT-principal.result
Normal file
7
testing/tests/carddav/2004-PUT-principal.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, bind, calendar-auto-schedule
|
||||
Content-Length: 59
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
A DAViCal principal collection may only contain collections
|
||||
24
testing/tests/carddav/2004-PUT-principal.test
Normal file
24
testing/tests/carddav/2004-PUT-principal.test
Normal file
@ -0,0 +1,24 @@
|
||||
#
|
||||
# PUT an arbitrary text file into a principal collection.
|
||||
#
|
||||
TYPE=PUT
|
||||
URL=http://regression.host/caldav.php/user1/strumar_and_beren_also.txt
|
||||
|
||||
HEADER=User-Agent: DAViCalTester/public
|
||||
HEADER=Content-Type: text/plain; charset=utf-8
|
||||
HEAD
|
||||
|
||||
BEGINDATA
|
||||
Once upon a time there was an old, old man who lived with a great
|
||||
white wolf. As is often the habit with men, he had not always been
|
||||
quite as old as he was now, and Beren had not always been this white,
|
||||
either.
|
||||
ENDDATA
|
||||
|
||||
QUERY
|
||||
SELECT caldav_data.dav_name, caldav_data.dav_etag
|
||||
FROM caldav_data
|
||||
WHERE caldav_data.dav_name ~ '/user1/strumar_and_beren_also.txt'
|
||||
ENDQUERY
|
||||
|
||||
|
||||
10
testing/tests/carddav/2005-PUT-arbitrary.result
Normal file
10
testing/tests/carddav/2005-PUT-arbitrary.result
Normal file
@ -0,0 +1,10 @@
|
||||
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, bind, calendar-auto-schedule
|
||||
Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
dav_etag: >a83ff0ef143f108d2062c8534506d801<
|
||||
dav_name: >/user1/addressbook/strumar_and_beren.txt<
|
||||
|
||||
25
testing/tests/carddav/2005-PUT-arbitrary.test
Normal file
25
testing/tests/carddav/2005-PUT-arbitrary.test
Normal file
@ -0,0 +1,25 @@
|
||||
#
|
||||
# PUT arbitrary text into a collection (in this case an addressbook)
|
||||
#
|
||||
TYPE=PUT
|
||||
URL=http://regression.host/caldav.php/user1/addressbook/strumar_and_beren.txt
|
||||
|
||||
HEADER=User-Agent: DAViCalTester/public
|
||||
HEADER=Content-Type: text/plain; charset=utf-8
|
||||
HEAD
|
||||
|
||||
BEGINDATA
|
||||
Once upon a time there was an old, old man who lived with a great
|
||||
white wolf. As is often the habit with men, he had not always been
|
||||
quite as old as he was now. Beren had not always been this white,
|
||||
either, he thought, lying across the porch and looking out at all
|
||||
the youthful energy visible in the springtime forest.
|
||||
ENDDATA
|
||||
|
||||
QUERY
|
||||
SELECT caldav_data.dav_name, caldav_data.dav_etag
|
||||
FROM caldav_data
|
||||
WHERE caldav_data.dav_name ~ '/user1/addressbook/strumar_and_beren.txt'
|
||||
ENDQUERY
|
||||
|
||||
|
||||
40
testing/tests/carddav/2006-PUT-vcard.result
Normal file
40
testing/tests/carddav/2006-PUT-vcard.result
Normal file
@ -0,0 +1,40 @@
|
||||
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, bind, calendar-auto-schedule
|
||||
Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
caladruri: >NULL<
|
||||
caluri: >NULL<
|
||||
dav_etag: >e36abdbed9f9996064ca54583616d32b<
|
||||
dav_name: >/user1/addressbook/donald_kelly.vcf<
|
||||
fburl: >NULL<
|
||||
fn: >Donald Kelly<
|
||||
n: >Kelly;Donald<
|
||||
nickname: >NULL<
|
||||
note: >NULL<
|
||||
org: >Esposo Designs Ltd<
|
||||
uid: >NULL<
|
||||
url: >www.example.co.nz<
|
||||
version: >2.1<
|
||||
|
||||
box_no: ><
|
||||
country: >New Zealand<
|
||||
locality: >Newtown<
|
||||
postcode: ><
|
||||
property: >adr:;;25 Rintoul St;Newtown;Wellington;;New Zealand<
|
||||
region: >Wellington<
|
||||
street_address: >25 Rintoul St<
|
||||
type: >NULL<
|
||||
unit_no: ><
|
||||
|
||||
tel: >+64 2 1234-4321<
|
||||
type: >cell<
|
||||
|
||||
tel: >+64 4 347 4747<
|
||||
type: >work<
|
||||
|
||||
email: >donald@example.co.nz<
|
||||
type: >internet<
|
||||
|
||||
60
testing/tests/carddav/2006-PUT-vcard.test
Normal file
60
testing/tests/carddav/2006-PUT-vcard.test
Normal file
@ -0,0 +1,60 @@
|
||||
#
|
||||
# PUT a VCARD record into an addressbook
|
||||
#
|
||||
TYPE=PUT
|
||||
URL=http://regression.host/caldav.php/user1/addressbook/donald_kelly.vcf
|
||||
|
||||
HEADER=Content-Type: text/vcard; charset=utf-8
|
||||
HEAD
|
||||
|
||||
BEGINDATA
|
||||
begin:vcard
|
||||
fn:Donald Kelly
|
||||
n:Kelly;Donald
|
||||
org:Esposo Designs Ltd
|
||||
adr:;;25 Rintoul St;Newtown;Wellington;;New Zealand
|
||||
email;type=internet:donald@example.co.nz
|
||||
title:Proprietor
|
||||
tel;type=work:+64 4 347 4747
|
||||
tel;type=cell:+64 2 1234-4321
|
||||
x-mozilla-html:TRUE
|
||||
url:www.example.co.nz
|
||||
version:2.1
|
||||
end:vcard
|
||||
ENDDATA
|
||||
|
||||
QUERY
|
||||
SELECT caldav_data.dav_name, caldav_data.dav_etag,
|
||||
version, uid, nickname, fn, n, note, org, url, fburl, caladruri, caluri
|
||||
FROM caldav_data LEFT JOIN addressbook_resource USING(dav_id)
|
||||
WHERE caldav_data.dav_name ~ '/user1/addressbook/donald_kelly.vcf'
|
||||
ENDQUERY
|
||||
|
||||
QUERY
|
||||
SELECT
|
||||
type, box_no, unit_no, street_address, locality, region, postcode, country, property
|
||||
FROM caldav_data
|
||||
LEFT JOIN addressbook_address_adr USING(dav_id)
|
||||
WHERE caldav_data.dav_name ~ '/user1/addressbook/donald_kelly.vcf'
|
||||
ORDER BY dav_id, property
|
||||
ENDQUERY
|
||||
|
||||
QUERY
|
||||
SELECT
|
||||
addressbook_address_tel.type, addressbook_address_tel.tel
|
||||
FROM caldav_data
|
||||
LEFT JOIN addressbook_address_tel USING(dav_id)
|
||||
WHERE caldav_data.dav_name ~ '/user1/addressbook/donald_kelly.vcf'
|
||||
ORDER BY dav_id, property
|
||||
ENDQUERY
|
||||
|
||||
QUERY
|
||||
SELECT
|
||||
addressbook_address_email.type, addressbook_address_email.email
|
||||
FROM caldav_data
|
||||
LEFT JOIN addressbook_address_email USING(dav_id)
|
||||
WHERE caldav_data.dav_name ~ '/user1/addressbook/donald_kelly.vcf'
|
||||
ORDER BY dav_id, property
|
||||
ENDQUERY
|
||||
|
||||
|
||||
16
testing/tests/carddav/2007-GET-arbitrary.result
Normal file
16
testing/tests/carddav/2007-GET-arbitrary.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, bind, calendar-auto-schedule
|
||||
Etag: ""
|
||||
Content-Length: 320
|
||||
Content-Type: text/calendar; charset="utf-8"
|
||||
|
||||
Once upon a time there was an old, old man who lived with a great
|
||||
white wolf. As is often the habit with men, he had not always been
|
||||
quite as old as he was now. Beren had not always been this white,
|
||||
either, he thought, lying across the porch and looking out at all
|
||||
the youthful energy visible in the springtime forest.
|
||||
|
||||
dav_etag: >a83ff0ef143f108d2062c8534506d801<
|
||||
dav_name: >/user1/addressbook/strumar_and_beren.txt<
|
||||
|
||||
18
testing/tests/carddav/2007-GET-arbitrary.test
Normal file
18
testing/tests/carddav/2007-GET-arbitrary.test
Normal file
@ -0,0 +1,18 @@
|
||||
#
|
||||
# GET the arbitrary text that we put there earlier
|
||||
#
|
||||
TYPE=GET
|
||||
URL=http://regression.host/caldav.php/user1/addressbook/strumar_and_beren.txt
|
||||
|
||||
HEAD
|
||||
|
||||
BEGINDATA
|
||||
ENDDATA
|
||||
|
||||
QUERY
|
||||
SELECT caldav_data.dav_name, caldav_data.dav_etag
|
||||
FROM caldav_data
|
||||
WHERE caldav_data.dav_name ~ '/user1/addressbook/strumar_and_beren.txt'
|
||||
ENDQUERY
|
||||
|
||||
|
||||
0
testing/tests/carddav/Restore-Database.result
Normal file
0
testing/tests/carddav/Restore-Database.result
Normal file
BIN
testing/tests/carddav/initial.dbdump
Normal file
BIN
testing/tests/carddav/initial.dbdump
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user