#
# Put a recurring event with changes.
#
# There is no CalDAV defined behaviour for this.
#
TYPE=PUT
URL=http://regression.host/caldav.php/user1/291-test-fb-rr-changes/
HEADER=User-Agent: RSCDS Testing/0.7.x
HEADER=Content-Type: text/calendar; charset=utf-8
AUTH=admin:nimda

HEAD

BEGINDATA
BEGIN:VCALENDAR
CALSCALE:GREGORIAN
PRODID:-//Ximian//NONSGML Evolution Calendar//EN
VERSION:2.0

BEGIN:VTIMEZONE
TZID:Pacific/Auckland
X-LIC-LOCATION:Pacific/Auckland
BEGIN:DAYLIGHT
TZNAME:NZDT
TZOFFSETFROM:+1200
TZOFFSETTO:+1300
DTSTART:20070930T020000
RRULE:FREQ=YEARLY;UNTIL=20360927T140000Z;BYDAY=-1SU;BYMONTH=9
END:DAYLIGHT
BEGIN:STANDARD
TZNAME:NZST
TZOFFSETFROM:+1300
TZOFFSETTO:+1200
DTSTART:20080406T030000
RRULE:FREQ=YEARLY;UNTIL=20370404T140000Z;BYDAY=1SU;BYMONTH=4
END:STANDARD
END:VTIMEZONE

BEGIN:VEVENT
UID:409f61c7243c61c382a0795fd97249618e39543c
DTSTAMP:20230429T013749Z
DTSTART;TZID=Pacific/Auckland:20230419T110000
DTEND;TZID=Pacific/Auckland:20230419T112500
SEQUENCE:5
SUMMARY:Daily Recurring
TRANSP:OPAQUE
CLASS:CONFIDENTIAL
CREATED:20230430T021510Z
LAST-MODIFIED:20230430T021534Z
END:VEVENT

BEGIN:VEVENT
UID:d126ea19c4f19eed5dbac8d8a1578b022fa5cec9
DTSTAMP:20230429T013749Z
DTSTART;TZID=Pacific/Auckland:20230417T090000
DTEND;TZID=Pacific/Auckland:20230417T092500
SEQUENCE:5
SUMMARY:Daily Recurring
TRANSP:OPAQUE
CLASS:CONFIDENTIAL
CREATED:20230430T021510Z
LAST-MODIFIED:20230430T021929Z
RRULE;X-EVOLUTION-ENDDATE=20230420T210000Z:FREQ=DAILY;COUNT=5
EXDATE:20230417T210000Z
EXDATE:20230418T210000Z
END:VEVENT

END:VCALENDAR
ENDDATA

QUERY
SELECT count(*) AS caldav_data FROM caldav_data WHERE dav_name ~ '^/user1/291-test-fb-rr-changes/'
ENDQUERY

QUERY
SELECT count(*) AS calendar_item FROM calendar_item WHERE dav_name ~ '^/user1/291-test-fb-rr-changes/'
ENDQUERY

QUERY
SELECT count(*) AS alarms FROM calendar_alarm JOIN calendar_item USING(dav_id)
  WHERE dav_name ~ '^/user1/291-test-fb-rr-changes/'
ENDQUERY

QUERY
SELECT count(*) AS attendees FROM calendar_attendee JOIN calendar_item USING(dav_id)
  WHERE dav_name ~ '^/user1/291-test-fb-rr-changes/'
ENDQUERY

QUERY
SELECT
     collection_id,
   dav_displayname,
          dav_etag,
          dav_name,
default_privileges,
       description,
    is_addressbook,
       is_calendar,
  parent_container,
public_events_only,
     resourcetypes,
   schedule_transp,
          timezone,
           user_no,
 publicly_readable
 FROM collection WHERE dav_name = '/user1/291-test-fb-rr-changes/'
ENDQUERY
