caldav.feature 4.6 KB

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