davical/testing/tests/regression-suite/2702a-PUT-Event.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 an event in 00010102
#
TYPE=PUT
AUTH=user1:user1
HEADER=User-Agent: test-suite/1.0
HEADER=Content-Type: text/calendar; charset=utf-8
HEAD
#
REPLACE=/^ETag: "[0-9a-f]+"/ETag: "a fine looking etag"/
BEGINDATA
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
BEGIN:VEVENT
CLASS:PUBLIC
DTSTAMP:20240120T034700Z
DTSTART:00010102T000000Z
DURATION:P1H
SUMMARY:Test date in 00010102
TRANSP:OPAQUE
UID:2702-PUT-Event-00010102
RRULE:FREQ=WEEKLY;COUNT=2
END:VEVENT
END:VCALENDAR
ENDDATA
URL=http://regression.host/caldav.php/user1/past-and-future/2702-PUT-Event-00010102.ics
QUERY
SELECT caldav_data.user_no, caldav_type, logged_user,
uid, dtstamp, dtstart at time zone olson_name as dtstart,
dtend at time zone olson_name as dtend, due, summary, location,
description, priority, class, transp, rrule, url,
percent_complete, tz_id, status,
calendar_item.last_modified,
caldav_data AS "A1 CalDAV DATA"
FROM caldav_data JOIN calendar_item USING(dav_name) LEFT JOIN timezones ON (tz_id=tzid)
WHERE caldav_data.dav_name ~ '^/user1/past-and-future/'
AND uid = '2702-PUT-Event-00010102'
ENDQUERY