caldav.feature 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. Feature: caldav
  2. Scenario: Accessing a not existing calendar of another user
  3. Given user "user0" exists
  4. When "admin" requests calendar "user0/MyCalendar" on the endpoint "/remote.php/dav/calendars/"
  5. Then The CalDAV HTTP status code should be "404"
  6. And The exception is "Sabre\DAV\Exception\NotFound"
  7. And The error message is "Node with name 'MyCalendar' could not be found"
  8. Scenario: Accessing a not shared calendar of another user
  9. Given user "user0" exists
  10. Given "admin" creates a calendar named "MyCalendar"
  11. Given The CalDAV HTTP status code should be "201"
  12. When "user0" requests calendar "admin/MyCalendar" on the endpoint "/remote.php/dav/calendars/"
  13. Then The CalDAV HTTP status code should be "404"
  14. And The exception is "Sabre\DAV\Exception\NotFound"
  15. And The error message is "Calendar with name 'MyCalendar' could not be found"
  16. Scenario: Accessing a not shared calendar of another user via the legacy endpoint
  17. Given user "user0" exists
  18. Given "admin" creates a calendar named "MyCalendar"
  19. Given The CalDAV HTTP status code should be "201"
  20. When "user0" requests calendar "admin/MyCalendar" on the endpoint "/remote.php/caldav/calendars/"
  21. Then The CalDAV HTTP status code should be "404"
  22. And The exception is "Sabre\DAV\Exception\NotFound"
  23. And The error message is "Calendar with name 'MyCalendar' could not be found"
  24. Scenario: Accessing a not existing calendar of another user
  25. Given user "user0" exists
  26. When "user0" requests calendar "admin/MyCalendar" on the endpoint "/remote.php/dav/calendars/"
  27. Then The CalDAV HTTP status code should be "404"
  28. And The exception is "Sabre\DAV\Exception\NotFound"
  29. And The error message is "Node with name 'MyCalendar' could not be found"
  30. Scenario: Accessing a not existing calendar of another user via the legacy endpoint
  31. Given user "user0" exists
  32. When "user0" requests calendar "admin/MyCalendar" on the endpoint "/remote.php/caldav/calendars/"
  33. Then The CalDAV HTTP status code should be "404"
  34. And The exception is "Sabre\DAV\Exception\NotFound"
  35. And The error message is "Node with name 'MyCalendar' could not be found"
  36. Scenario: Accessing a not existing calendar of myself
  37. Given user "user0" exists
  38. When "user0" requests calendar "admin/MyCalendar" on the endpoint "/remote.php/dav/calendars/"
  39. Then The CalDAV HTTP status code should be "404"
  40. And The exception is "Sabre\DAV\Exception\NotFound"
  41. And The error message is "Node with name 'MyCalendar' could not be found"
  42. Scenario: Creating a new calendar
  43. When "admin" creates a calendar named "MyCalendar"
  44. Then The CalDAV HTTP status code should be "201"
  45. And "admin" requests calendar "admin/MyCalendar" on the endpoint "/remote.php/dav/calendars/"
  46. Then The CalDAV HTTP status code should be "207"
  47. Scenario: Propfind on public calendar endpoint without calendars
  48. When "admin" creates a calendar named "MyCalendar"
  49. Then The CalDAV HTTP status code should be "201"
  50. And "admin" publicly shares the calendar named "MyCalendar"
  51. Then The CalDAV HTTP status code should be "202"
  52. When "admin" requests calendar "/" on the endpoint "/remote.php/dav/public-calendars"
  53. Then The CalDAV HTTP status code should be "207"
  54. Then There should be "0" calendars in the response body
  55. Scenario: Create calendar request for non-existing calendar of another user
  56. Given user "user0" exists
  57. When "user0" sends a create calendar request to "admin/MyCalendar2" on the endpoint "/remote.php/dav/calendars/"
  58. Then The CalDAV HTTP status code should be "404"
  59. And The exception is "Sabre\DAV\Exception\NotFound"
  60. And The error message is "Node with name 'admin' could not be found"
  61. Scenario: Create calendar request for existing calendar of another user
  62. Given user "user0" exists
  63. When "admin" creates a calendar named "MyCalendar2"
  64. Then The CalDAV HTTP status code should be "201"
  65. When "user0" sends a create calendar request to "admin/MyCalendar2" on the endpoint "/remote.php/dav/calendars/"
  66. Then The CalDAV HTTP status code should be "404"
  67. And The exception is "Sabre\DAV\Exception\NotFound"
  68. And The error message is "Node with name 'admin' could not be found"
  69. Scenario: Update a principal's schedule-default-calendar-URL
  70. Given user "user0" exists
  71. And "user0" creates a calendar named "MyCalendar2"
  72. When "user0" updates property "{urn:ietf:params:xml:ns:caldav}schedule-default-calendar-URL" to href "/remote.php/dav/calendars/user0/MyCalendar2/" of principal "users/user0" on the endpoint "/remote.php/dav/principals/"
  73. Then The CalDAV response should be multi status
  74. And The CalDAV response should contain a property "{urn:ietf:params:xml:ns:caldav}schedule-default-calendar-URL"
  75. When "user0" requests principal "users/user0" on the endpoint "/remote.php/dav/principals/"
  76. Then The CalDAV response should be multi status
  77. And The CalDAV response should contain a property "{urn:ietf:params:xml:ns:caldav}schedule-default-calendar-URL" with a href value "/remote.php/dav/calendars/user0/MyCalendar2/"