davical/testing/tests/regression-suite/2550-RRULE-PUT.test
Andrew Ruthven 7c47658bee Make the curl and SQL requests when we see them
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.
2024-04-01 22:57:10 +13:00

46 lines
1.2 KiB
Plaintext

#
# PUT a fancy RRULE
#
# To test https://gitlab.com/davical-project/davical/-/issues/283
#
TYPE=PUT
HEADER=User-Agent: DAViCal/1.12
HEADER=Accept: text/xml,application/xml
HEADER=Content-Type: text/calendar; charset=utf-8
HEAD
BEGINDATA
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Example Corp.//CalDAV Client//EN
BEGIN:VTODO
UID:takeoutthethrash
DTSTAMP:20221013T151313Z
DTSTART:20221017T065500Z
STATUS:NEEDS-ACTION
DURATION:PT10M
SUMMARY:Take out the thrash before the collectors come.
RRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=6;BYMINUTE=55;COUNT=3
CATEGORIES:CHORE
PRIORITY:3
END:VTODO
END:VCALENDAR
ENDDATA
URL=http://regression.host/caldav.php/user1/home/takeoutthethrash.ics
QUERY
SELECT caldav_data.user_no, caldav_data.dav_etag, caldav_type, logged_user,
uid, dtstamp, dtstart, dtend, due, summary, location,
description, priority, class, transp, rrule, url,
percent_complete, status,
caldav_data AS " CalDAV Data",
((current_timestamp AT TIME ZONE 'GMT' - calendar_item.last_modified) < '2 seconds'::interval) AS "~ Modified Now"
FROM caldav_data JOIN calendar_item USING(dav_name)
WHERE caldav_data.dav_name =
'/user1/home/takeoutthethrash.ics';
ENDQUERY