mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-04-30 16:00:25 +00:00
This allows us to have more complex test files where an action is taken, then we test something, then another action is taken, etc. Changes to test files are required so that URL is defined after all the required settings are set. Changes to the result files are either whitespace changes due to above logic changes, or printing out a SQL Result header before each result. I figured it was useful.
36 lines
1.3 KiB
Plaintext
36 lines
1.3 KiB
Plaintext
#
|
|
# Request a freebusy report by URL
|
|
#
|
|
TYPE=REPORT
|
|
HEADER=User-Agent: DAViCalTester/public
|
|
HEADER=Content-Type: text/xml; charset="UTF-8"
|
|
HEAD
|
|
|
|
REPLACE=/^DTSTAMP:\d{8}T\d{6}Z\r?$/DTSTAMP:yyyymmddThhmmssZ/
|
|
REPLACE=/^DTSTART:20060930T120000Z\r?$/DTSTART:correct/
|
|
REPLACE=/^DTEND:20070630T115959Z\r?$/DTEND:correct/
|
|
|
|
BEGINDATA
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<free-busy-query xmlns:D="DAV:" xmlns="urn:ietf:params:xml:ns:caldav">
|
|
<time-range start="20060930T120000Z" end="20070630T115959Z"/>
|
|
</free-busy-query>
|
|
ENDDATA
|
|
|
|
URL=http://regression.host/caldav.php/user1/home/
|
|
|
|
QUERY
|
|
SELECT dav_name AS "Dav Name", calendar_item.rrule, status,
|
|
to_char(calendar_item.dtstart at time zone 'GMT','YYYYMMDD"T"HH24MISS"Z"') AS "a) start",
|
|
to_char(calendar_item.dtend at time zone 'GMT','YYYYMMDD"T"HH24MISS"Z"') AS "b)finish"
|
|
FROM caldav_data INNER JOIN calendar_item USING(dav_id,user_no,dav_name)
|
|
WHERE
|
|
dav_name ~ '^/user1/home/[^/]+$'
|
|
AND rrule_event_overlaps( dtstart, dtend, rrule, '20061001T000000', '20070630T235959')
|
|
AND caldav_data.caldav_type IN ( 'VEVENT', 'VFREEBUSY' )
|
|
AND (calendar_item.status != 'CANCELLED' OR calendar_item.status IS NULL)
|
|
AND (calendar_item.class != 'PRIVATE' OR calendar_item.class IS NULL)
|
|
ORDER BY 2, 3, 4
|
|
ENDQUERY
|
|
# caldav_data.user_no = 10
|