mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-30 03:24:47 +00:00
New tests to confirm DTEND is calculated correctly when not set.
This commit is contained in:
parent
87fe232586
commit
a99ed3f258
62
testing/tests/regression-suite/817-Spec-PUT.result
Normal file
62
testing/tests/regression-suite/817-Spec-PUT.result
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
HTTP/1.1 201 Created
|
||||||
|
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||||
|
DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
|
||||||
|
ETag: "165746adbab8bc0c8336a63cc5332ff2"
|
||||||
|
Content-Length: 0
|
||||||
|
Content-Type: text/plain; charset="utf-8"
|
||||||
|
|
||||||
|
CalDAV Data: >BEGIN:VCALENDAR
|
||||||
|
VERSION:2.0
|
||||||
|
PRODID:-//davical.org//NONSGML AWL Calendar//EN
|
||||||
|
CALSCALE:GREGORIAN
|
||||||
|
BEGIN:VTIMEZONE
|
||||||
|
TZID:Pacific/Auckland
|
||||||
|
BEGIN:STANDARD
|
||||||
|
TZOFFSETFROM:+1300
|
||||||
|
TZOFFSETTO:+1200
|
||||||
|
DTSTART:19900318T030000
|
||||||
|
RRULE:FREQ=YEARLY;UNTIL=20070317T140000Z;BYMONTH=3;BYDAY=3SU
|
||||||
|
TZNAME:NZST
|
||||||
|
END:STANDARD
|
||||||
|
BEGIN:DAYLIGHT
|
||||||
|
TZOFFSETFROM:+1200
|
||||||
|
TZOFFSETTO:+1300
|
||||||
|
DTSTART:19901007T020000
|
||||||
|
RRULE:FREQ=YEARLY;UNTIL=20060930T140000Z;BYMONTH=10;BYDAY=1SU
|
||||||
|
TZNAME:NZDT
|
||||||
|
END:DAYLIGHT
|
||||||
|
END:VTIMEZONE
|
||||||
|
BEGIN:VEVENT
|
||||||
|
DESCRIPTION:Have a party. All the best parties are monthly!
|
||||||
|
UID:DAYPARTY-77C6-4FB7-BDD3-6882E2F1BE74
|
||||||
|
DTSTAMP:20081024T220925Z
|
||||||
|
SUMMARY:Party all day!
|
||||||
|
CREATED:20081024T220749Z
|
||||||
|
DTSTART;TZID=Pacific/Auckland;VALUE=DATE:20081114
|
||||||
|
RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=2FR
|
||||||
|
END:VEVENT
|
||||||
|
END:VCALENDAR
|
||||||
|
<
|
||||||
|
caldav_type: >VEVENT<
|
||||||
|
class: >PUBLIC<
|
||||||
|
dav_etag: >165746adbab8bc0c8336a63cc5332ff2<
|
||||||
|
description: >Have a party. All the best parties are monthly!<
|
||||||
|
dtend: >2008-11-15 00:00:00+13<
|
||||||
|
dtstamp: >2008-10-24 22:09:25<
|
||||||
|
dtstart: >2008-11-14 00:00:00+13<
|
||||||
|
due: >NULL<
|
||||||
|
location: >NULL<
|
||||||
|
logged_user: >10<
|
||||||
|
percent_complete: >NULL<
|
||||||
|
priority: >NULL<
|
||||||
|
rrule: >FREQ=MONTHLY;INTERVAL=1;BYDAY=2FR<
|
||||||
|
status: >NULL<
|
||||||
|
summary: >Party all day!<
|
||||||
|
transp: >NULL<
|
||||||
|
tz_id: >Pacific/Auckland<
|
||||||
|
uid: >DAYPARTY-77C6-4FB7-BDD3-6882E2F1BE74<
|
||||||
|
url: >NULL<
|
||||||
|
user_no: >10<
|
||||||
|
~ Modified Now: >1<
|
||||||
|
~Duration: >1 day<
|
||||||
|
|
||||||
58
testing/tests/regression-suite/817-Spec-PUT.test
Normal file
58
testing/tests/regression-suite/817-Spec-PUT.test
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
#
|
||||||
|
# PUT an iCal style event into the database
|
||||||
|
#
|
||||||
|
TYPE=PUT
|
||||||
|
URL=http://mycaldav/caldav.php/user1/home/DAYPARTY-77C6-4FB7-BDD3-6882E2F1BE74.ics
|
||||||
|
HEADER=Content-Type: text/calendar
|
||||||
|
HEADER=User-Agent: RFC2518 Spec Tests
|
||||||
|
HEAD
|
||||||
|
|
||||||
|
|
||||||
|
BEGINDATA
|
||||||
|
BEGIN:VCALENDAR
|
||||||
|
VERSION:2.0
|
||||||
|
PRODID:-//davical.org//NONSGML AWL Calendar//EN
|
||||||
|
CALSCALE:GREGORIAN
|
||||||
|
BEGIN:VTIMEZONE
|
||||||
|
TZID:Pacific/Auckland
|
||||||
|
BEGIN:STANDARD
|
||||||
|
TZOFFSETFROM:+1300
|
||||||
|
TZOFFSETTO:+1200
|
||||||
|
DTSTART:19900318T030000
|
||||||
|
RRULE:FREQ=YEARLY;UNTIL=20070317T140000Z;BYMONTH=3;BYDAY=3SU
|
||||||
|
TZNAME:NZST
|
||||||
|
END:STANDARD
|
||||||
|
BEGIN:DAYLIGHT
|
||||||
|
TZOFFSETFROM:+1200
|
||||||
|
TZOFFSETTO:+1300
|
||||||
|
DTSTART:19901007T020000
|
||||||
|
RRULE:FREQ=YEARLY;UNTIL=20060930T140000Z;BYMONTH=10;BYDAY=1SU
|
||||||
|
TZNAME:NZDT
|
||||||
|
END:DAYLIGHT
|
||||||
|
END:VTIMEZONE
|
||||||
|
BEGIN:VEVENT
|
||||||
|
DESCRIPTION:Have a party. All the best parties are monthly!
|
||||||
|
UID:DAYPARTY-77C6-4FB7-BDD3-6882E2F1BE74
|
||||||
|
DTSTAMP:20081024T220925Z
|
||||||
|
SUMMARY:Party all day!
|
||||||
|
CREATED:20081024T220749Z
|
||||||
|
DTSTART;TZID=Pacific/Auckland;VALUE=DATE:20081114
|
||||||
|
RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=2FR
|
||||||
|
END:VEVENT
|
||||||
|
END:VCALENDAR
|
||||||
|
ENDDATA
|
||||||
|
|
||||||
|
|
||||||
|
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, tz_id, status,
|
||||||
|
caldav_data AS " CalDAV Data",
|
||||||
|
((current_timestamp AT TIME ZONE 'GMT' - last_modified) < '2 seconds'::interval) AS "~ Modified Now",
|
||||||
|
dtend - dtstart AS "~Duration"
|
||||||
|
FROM caldav_data JOIN calendar_item USING(dav_name)
|
||||||
|
WHERE caldav_data.dav_name =
|
||||||
|
'/user1/home/DAYPARTY-77C6-4FB7-BDD3-6882E2F1BE74.ics';
|
||||||
|
ENDQUERY
|
||||||
|
|
||||||
62
testing/tests/regression-suite/818-Spec-PUT.result
Normal file
62
testing/tests/regression-suite/818-Spec-PUT.result
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
HTTP/1.1 201 Created
|
||||||
|
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||||
|
DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
|
||||||
|
ETag: "8600dc4a1b264a09a5f741d710497cba"
|
||||||
|
Content-Length: 0
|
||||||
|
Content-Type: text/plain; charset="utf-8"
|
||||||
|
|
||||||
|
CalDAV Data: >BEGIN:VCALENDAR
|
||||||
|
VERSION:2.0
|
||||||
|
PRODID:-//davical.org//NONSGML AWL Calendar//EN
|
||||||
|
CALSCALE:GREGORIAN
|
||||||
|
BEGIN:VTIMEZONE
|
||||||
|
TZID:Pacific/Auckland
|
||||||
|
BEGIN:STANDARD
|
||||||
|
TZOFFSETFROM:+1300
|
||||||
|
TZOFFSETTO:+1200
|
||||||
|
DTSTART:19900318T030000
|
||||||
|
RRULE:FREQ=YEARLY;UNTIL=20070317T140000Z;BYMONTH=3;BYDAY=3SU
|
||||||
|
TZNAME:NZST
|
||||||
|
END:STANDARD
|
||||||
|
BEGIN:DAYLIGHT
|
||||||
|
TZOFFSETFROM:+1200
|
||||||
|
TZOFFSETTO:+1300
|
||||||
|
DTSTART:19901007T020000
|
||||||
|
RRULE:FREQ=YEARLY;UNTIL=20060930T140000Z;BYMONTH=10;BYDAY=1SU
|
||||||
|
TZNAME:NZDT
|
||||||
|
END:DAYLIGHT
|
||||||
|
END:VTIMEZONE
|
||||||
|
BEGIN:VEVENT
|
||||||
|
DESCRIPTION:Have a microparty. All the best parties are monthly!
|
||||||
|
UID:MICROPARTY-77C6-4FB7-BDD3-6882E2F1BE74
|
||||||
|
DTSTAMP:20081024T220925Z
|
||||||
|
SUMMARY:Woohoo! Time to Par-tay!
|
||||||
|
CREATED:20081024T220749Z
|
||||||
|
DTSTART;TZID=Pacific/Auckland:20081121T160000
|
||||||
|
RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=3FR
|
||||||
|
END:VEVENT
|
||||||
|
END:VCALENDAR
|
||||||
|
<
|
||||||
|
caldav_type: >VEVENT<
|
||||||
|
class: >PUBLIC<
|
||||||
|
dav_etag: >8600dc4a1b264a09a5f741d710497cba<
|
||||||
|
description: >Have a microparty. All the best parties are monthly!<
|
||||||
|
dtend: >2008-11-21 16:00:00+13<
|
||||||
|
dtstamp: >2008-10-24 22:09:25<
|
||||||
|
dtstart: >2008-11-21 16:00:00+13<
|
||||||
|
due: >NULL<
|
||||||
|
location: >NULL<
|
||||||
|
logged_user: >10<
|
||||||
|
percent_complete: >NULL<
|
||||||
|
priority: >NULL<
|
||||||
|
rrule: >FREQ=MONTHLY;INTERVAL=1;BYDAY=3FR<
|
||||||
|
status: >NULL<
|
||||||
|
summary: >Woohoo! Time to Par-tay!<
|
||||||
|
transp: >NULL<
|
||||||
|
tz_id: >Pacific/Auckland<
|
||||||
|
uid: >MICROPARTY-77C6-4FB7-BDD3-6882E2F1BE74<
|
||||||
|
url: >NULL<
|
||||||
|
user_no: >10<
|
||||||
|
~ Modified Now: >1<
|
||||||
|
~Duration: >00:00:00<
|
||||||
|
|
||||||
58
testing/tests/regression-suite/818-Spec-PUT.test
Normal file
58
testing/tests/regression-suite/818-Spec-PUT.test
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
#
|
||||||
|
# PUT an iCal style event into the database
|
||||||
|
#
|
||||||
|
TYPE=PUT
|
||||||
|
URL=http://mycaldav/caldav.php/user1/home/MICROPARTY-77C6-4FB7-BDD3-6882E2F1BE74.ics
|
||||||
|
HEADER=Content-Type: text/calendar
|
||||||
|
HEADER=User-Agent: RFC2518 Spec Tests
|
||||||
|
HEAD
|
||||||
|
|
||||||
|
|
||||||
|
BEGINDATA
|
||||||
|
BEGIN:VCALENDAR
|
||||||
|
VERSION:2.0
|
||||||
|
PRODID:-//davical.org//NONSGML AWL Calendar//EN
|
||||||
|
CALSCALE:GREGORIAN
|
||||||
|
BEGIN:VTIMEZONE
|
||||||
|
TZID:Pacific/Auckland
|
||||||
|
BEGIN:STANDARD
|
||||||
|
TZOFFSETFROM:+1300
|
||||||
|
TZOFFSETTO:+1200
|
||||||
|
DTSTART:19900318T030000
|
||||||
|
RRULE:FREQ=YEARLY;UNTIL=20070317T140000Z;BYMONTH=3;BYDAY=3SU
|
||||||
|
TZNAME:NZST
|
||||||
|
END:STANDARD
|
||||||
|
BEGIN:DAYLIGHT
|
||||||
|
TZOFFSETFROM:+1200
|
||||||
|
TZOFFSETTO:+1300
|
||||||
|
DTSTART:19901007T020000
|
||||||
|
RRULE:FREQ=YEARLY;UNTIL=20060930T140000Z;BYMONTH=10;BYDAY=1SU
|
||||||
|
TZNAME:NZDT
|
||||||
|
END:DAYLIGHT
|
||||||
|
END:VTIMEZONE
|
||||||
|
BEGIN:VEVENT
|
||||||
|
DESCRIPTION:Have a microparty. All the best parties are monthly!
|
||||||
|
UID:MICROPARTY-77C6-4FB7-BDD3-6882E2F1BE74
|
||||||
|
DTSTAMP:20081024T220925Z
|
||||||
|
SUMMARY:Woohoo! Time to Par-tay!
|
||||||
|
CREATED:20081024T220749Z
|
||||||
|
DTSTART;TZID=Pacific/Auckland:20081121T160000
|
||||||
|
RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=3FR
|
||||||
|
END:VEVENT
|
||||||
|
END:VCALENDAR
|
||||||
|
ENDDATA
|
||||||
|
|
||||||
|
|
||||||
|
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, tz_id, status,
|
||||||
|
caldav_data AS " CalDAV Data",
|
||||||
|
((current_timestamp AT TIME ZONE 'GMT' - last_modified) < '2 seconds'::interval) AS "~ Modified Now",
|
||||||
|
dtend - dtstart AS "~Duration"
|
||||||
|
FROM caldav_data JOIN calendar_item USING(dav_name)
|
||||||
|
WHERE caldav_data.dav_name =
|
||||||
|
'/user1/home/MICROPARTY-77C6-4FB7-BDD3-6882E2F1BE74.ics';
|
||||||
|
ENDQUERY
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user