caldav.feature 5.1 KB

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