From 5d8da10bf8263ea5f49b8d53843073f663319792 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 30 May 2007 10:25:16 +1200 Subject: [PATCH] More extensive tests for freebusy permissions. --- .../regression-suite/836-freebusy.result | 68 +++++++++++++++++++ .../tests/regression-suite/836-freebusy.test | 13 ++++ .../regression-suite/837-freebusy.result | 5 ++ .../tests/regression-suite/837-freebusy.test | 13 ++++ 4 files changed, 99 insertions(+) create mode 100644 testing/tests/regression-suite/836-freebusy.result create mode 100644 testing/tests/regression-suite/836-freebusy.test create mode 100644 testing/tests/regression-suite/837-freebusy.result create mode 100644 testing/tests/regression-suite/837-freebusy.test diff --git a/testing/tests/regression-suite/836-freebusy.result b/testing/tests/regression-suite/836-freebusy.result new file mode 100644 index 00000000..cd5fca33 --- /dev/null +++ b/testing/tests/regression-suite/836-freebusy.result @@ -0,0 +1,68 @@ +HTTP/1.1 200 OK +Date: Dow, 01 Jan 2000 00:00:00 GMT +Content-Length: 1892 +Content-Type: text/calendar + +BEGIN:VCALENDAR +PRODID:-//Catalyst.Net.NZ//NONSGML AWL Calendar//EN +VERSION:2.0 +BEGIN:VFREEBUSY +DTSTAMP:yyyymmddThhmmssZ +DTSTART:yyyymmddThhmmss +DTEND:yyyymmddThhmmss +FREEBUSY;FBTYPE=BUSY-TENTATIVE:20061223T060000/PT2H +FREEBUSY:20061031T210000/PT1H +FREEBUSY:20061102T210000/PT1H +FREEBUSY:20061109T210000/PT1H +FREEBUSY:20061116T210000/PT1H +FREEBUSY:20061123T210000/PT1H +FREEBUSY:20061130T210000/PT1H +FREEBUSY:20061207T210000/PT1H +FREEBUSY:20061214T210000/PT1H +FREEBUSY:20061221T210000/PT1H +FREEBUSY:20061228T210000/PT1H +FREEBUSY:20070104T210000/PT1H +FREEBUSY:20070111T210000/PT1H +FREEBUSY:20070118T210000/PT1H +FREEBUSY:20070125T210000/PT1H +FREEBUSY:20070201T210000/PT1H +FREEBUSY:20070208T210000/PT1H +FREEBUSY:20070215T210000/PT1H +FREEBUSY:20070222T210000/PT1H +FREEBUSY:20070301T210000/PT1H +FREEBUSY:20070308T210000/PT1H +FREEBUSY:20070315T210000/PT1H +FREEBUSY:20070322T210000/PT1H +FREEBUSY:20070329T210000/PT1H +FREEBUSY:20070405T210000/PT1H +FREEBUSY:20070412T210000/PT1H +FREEBUSY:20070419T210000/PT1H +FREEBUSY:20070426T210000/PT1H +FREEBUSY:20061101T233000/PT1H +FREEBUSY:20061202T183000/PT2H +FREEBUSY:20070102T183000/PT2H +FREEBUSY:20070202T183000/PT2H +FREEBUSY:20070302T183000/PT2H +FREEBUSY:20070402T183000/PT2H +FREEBUSY:20070502T183000/PT2H +FREEBUSY:20070602T183000/PT2H +FREEBUSY:20061117T030000/PT1H45M +FREEBUSY:20061201T030000/PT1H45M +FREEBUSY:20061215T030000/PT1H45M +FREEBUSY:20061229T030000/PT1H45M +FREEBUSY:20070112T030000/PT1H45M +FREEBUSY:20070126T030000/PT1H45M +FREEBUSY:20070209T030000/PT1H45M +FREEBUSY:20070223T030000/PT1H45M +FREEBUSY:20070309T030000/PT1H45M +FREEBUSY:20070323T030000/PT1H45M +FREEBUSY:20070406T030000/PT1H45M +FREEBUSY:20070420T030000/PT1H45M +FREEBUSY:20070504T030000/PT1H45M +FREEBUSY:20070518T030000/PT1H45M +FREEBUSY:20070601T030000/PT1H45M +FREEBUSY:20070615T030000/PT1H45M +FREEBUSY:20070629T030000/PT1H45M +FREEBUSY:20061223T030000/PT2H +END:VFREEBUSY +END:VCALENDAR diff --git a/testing/tests/regression-suite/836-freebusy.test b/testing/tests/regression-suite/836-freebusy.test new file mode 100644 index 00000000..e70758a3 --- /dev/null +++ b/testing/tests/regression-suite/836-freebusy.test @@ -0,0 +1,13 @@ +# +# Request a freebusy report by URL, from a different user +# who has been granted freebusy privilege to this calendar. +# +TYPE=GET +AUTH=user2:user2 +URL=http://mycaldav/freebusy.php/user1@example.net?start=20061001T000000&finish=20070630T235959 +HEAD + +REPLACE=/^DTSTAMP:\d{8}T\d{6}Z$/DTSTAMP:yyyymmddThhmmssZ/ +REPLACE=/^DTSTART:\d{8}T\d{6}$/DTSTART:yyyymmddThhmmss/ +REPLACE=/^DTEND:\d{8}T\d{6}$/DTEND:yyyymmddThhmmss/ + diff --git a/testing/tests/regression-suite/837-freebusy.result b/testing/tests/regression-suite/837-freebusy.result new file mode 100644 index 00000000..4bf29a16 --- /dev/null +++ b/testing/tests/regression-suite/837-freebusy.result @@ -0,0 +1,5 @@ +HTTP/1.1 404 Not Found +Date: Dow, 01 Jan 2000 00:00:00 GMT +Content-Length: 0 +Content-Type: text/plain; charset=UTF-8 + diff --git a/testing/tests/regression-suite/837-freebusy.test b/testing/tests/regression-suite/837-freebusy.test new file mode 100644 index 00000000..f8475323 --- /dev/null +++ b/testing/tests/regression-suite/837-freebusy.test @@ -0,0 +1,13 @@ +# +# Request a freebusy report by URL by a user +# who doesn't have freebusy access. +# +TYPE=GET +AUTH=user3:user3 +URL=http://mycaldav/freebusy.php/user1@example.net?start=20061001T000000&finish=20070630T235959 +HEAD + +REPLACE=/^DTSTAMP:\d{8}T\d{6}Z$/DTSTAMP:yyyymmddThhmmssZ/ +REPLACE=/^DTSTART:\d{8}T\d{6}$/DTSTART:yyyymmddThhmmss/ +REPLACE=/^DTEND:\d{8}T\d{6}$/DTEND:yyyymmddThhmmss/ +