caldav.feature 4.5 KB

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