carddav.feature 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. Feature: carddav
  2. Scenario: Accessing a not existing addressbook of another user
  3. Given user "user0" exists
  4. When "admin" requests addressbook "user0/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/dav/addressbooks/users/"
  5. And The CardDAV exception is "Internal Server Error"
  6. Scenario: Accessing a not shared addressbook of another user
  7. Given user "user0" exists
  8. Given "admin" creates an addressbook named "MyAddressbook" with statuscode "201"
  9. When "user0" requests addressbook "admin/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/dav/addressbooks/users/"
  10. And The CardDAV exception is "Internal Server Error"
  11. Scenario: Accessing a not existing addressbook of another user via legacy endpoint
  12. Given user "user0" exists
  13. When "admin" requests addressbook "user0/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/carddav/addressbooks/"
  14. And The CardDAV exception is "Sabre\DAV\Exception\NotFound"
  15. And The CardDAV error message is "Addressbook with name 'MyAddressbook' could not be found"
  16. Scenario: Accessing a not shared addressbook of another user via legacy endpoint
  17. Given user "user0" exists
  18. Given "admin" creates an addressbook named "MyAddressbook" with statuscode "201"
  19. When "user0" requests addressbook "admin/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/carddav/addressbooks/"
  20. And The CardDAV exception is "Sabre\DAV\Exception\NotFound"
  21. And The CardDAV error message is "Addressbook with name 'MyAddressbook' could not be found"
  22. Scenario: Accessing a not existing addressbook of myself
  23. Given user "user0" exists
  24. When "user0" requests addressbook "admin/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/dav/addressbooks/users/"
  25. And The CardDAV exception is "Internal Server Error"
  26. Scenario: Creating a new addressbook
  27. When "admin" creates an addressbook named "MyAddressbook" with statuscode "201"
  28. Then "admin" requests addressbook "admin/MyAddressbook" with statuscode "207" on the endpoint "/remote.php/dav/addressbooks/users/"
  29. Scenario: Accessing ones own contact
  30. Given "admin" creates an addressbook named "MyAddressbook" with statuscode "201"
  31. Given "admin" uploads the contact "bjoern.vcf" to the addressbook "MyAddressbook"
  32. When Downloading the contact "bjoern.vcf" from addressbook "MyAddressbook" as user "admin"
  33. Then The following HTTP headers should be set
  34. |Content-Disposition|attachment; filename*=UTF-8''bjoern.vcf; filename="bjoern.vcf"|
  35. |Content-Type|text/vcard; charset=utf-8|
  36. |Content-Security-Policy|default-src 'none';|
  37. |X-Content-Type-Options |nosniff|
  38. |X-Frame-Options|SAMEORIGIN|
  39. |X-Permitted-Cross-Domain-Policies|none|
  40. |X-Robots-Tag|noindex, nofollow|
  41. |X-XSS-Protection|1; mode=block|
  42. Scenario: Exporting the picture of ones own contact
  43. Given "admin" creates an addressbook named "MyAddressbook" with statuscode "201"
  44. Given "admin" uploads the contact "bjoern.vcf" to the addressbook "MyAddressbook"
  45. When Exporting the picture of contact "bjoern.vcf" from addressbook "MyAddressbook" as user "admin"
  46. Then The following HTTP headers should be set
  47. |Content-Disposition|attachment; filename=bjoern.vcf.jpg|
  48. |Content-Type|image/jpeg|
  49. |Content-Security-Policy|default-src 'none';|
  50. |X-Content-Type-Options |nosniff|
  51. |X-Frame-Options|SAMEORIGIN|
  52. |X-Permitted-Cross-Domain-Policies|none|
  53. |X-Robots-Tag|noindex, nofollow|
  54. |X-XSS-Protection|1; mode=block|
  55. Scenario: Create addressbook request for non-existing addressbook of another user
  56. Given user "user0" exists
  57. When "user0" sends a create addressbook request to "admin/MyAddressbook2" on the endpoint "/remote.php/dav/addressbooks/"
  58. Then The CardDAV HTTP status code should be "404"
  59. And The CardDAV exception is "Internal Server Error"
  60. Scenario: Create addressbook request for existing addressbook of another user
  61. Given user "user0" exists
  62. When "admin" creates an addressbook named "MyAddressbook2" with statuscode "201"
  63. When "user0" sends a create addressbook request to "admin/MyAddressbook2" on the endpoint "/remote.php/dav/addressbooks/"
  64. Then The CardDAV HTTP status code should be "404"
  65. And The CardDAV exception is "Internal Server Error"