-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integration tests for legacy DAV endpoints
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
- Loading branch information
1 parent
d0e4097
commit f123f92
Showing
8 changed files
with
90 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,52 @@ | ||
Feature: caldav | ||
Scenario: Accessing a not existing calendar of another user | ||
Given user "user0" exists | ||
When "admin" requests calendar "user0/MyCalendar" | ||
When "admin" requests calendar "user0/MyCalendar" on the endpoint "/remote.php/dav/calendars/" | ||
Then The CalDAV HTTP status code should be "404" | ||
And The exception is "Sabre\DAV\Exception\NotFound" | ||
And The error message is "Node with name 'MyCalendar' could not be found" | ||
|
||
# Blocked by https://github.com/php/php-src/pull/1417 | ||
#Scenario: Accessing a not shared calendar of another user | ||
# Given user "user0" exists | ||
# Given "admin" creates a calendar named "MyCalendar" | ||
# Given The CalDAV HTTP status code should be "201" | ||
# When "user0" requests calendar "admin/MyCalendar" | ||
# Then The CalDAV HTTP status code should be "404" | ||
# And The exception is "Sabre\DAV\Exception\NotFound" | ||
# And The error message is "Node with name 'MyCalendar' could not be found" | ||
Scenario: Accessing a not shared calendar of another user | ||
Given user "user0" exists | ||
Given "admin" creates a calendar named "MyCalendar" | ||
Given The CalDAV HTTP status code should be "201" | ||
When "user0" requests calendar "admin/MyCalendar" on the endpoint "/remote.php/dav/calendars/" | ||
Then The CalDAV HTTP status code should be "404" | ||
And The exception is "Sabre\DAV\Exception\NotFound" | ||
And The error message is "Node with name 'MyCalendar' could not be found" | ||
|
||
Scenario: Accessing a not shared calendar of another user via the legacy endpoint | ||
Given user "user0" exists | ||
Given "admin" creates a calendar named "MyCalendar" | ||
Given The CalDAV HTTP status code should be "201" | ||
When "user0" requests calendar "admin/MyCalendar" on the endpoint "/remote.php/caldav/calendars/" | ||
Then The CalDAV HTTP status code should be "404" | ||
And The exception is "Sabre\DAV\Exception\NotFound" | ||
And The error message is "Node with name 'MyCalendar' could not be found" | ||
|
||
Scenario: Accessing a not existing calendar of another user | ||
Given user "user0" exists | ||
When "user0" requests calendar "admin/MyCalendar" on the endpoint "/remote.php/dav/calendars/" | ||
Then The CalDAV HTTP status code should be "404" | ||
And The exception is "Sabre\DAV\Exception\NotFound" | ||
And The error message is "Node with name 'MyCalendar' could not be found" | ||
|
||
Scenario: Accessing a not existing calendar of another user via the legacy endpoint | ||
Given user "user0" exists | ||
When "user0" requests calendar "admin/MyCalendar" on the endpoint "/remote.php/caldav/calendars/" | ||
Then The CalDAV HTTP status code should be "404" | ||
And The exception is "Sabre\DAV\Exception\NotFound" | ||
And The error message is "Node with name 'MyCalendar' could not be found" | ||
|
||
Scenario: Accessing a not existing calendar of myself | ||
Given user "user0" exists | ||
When "user0" requests calendar "admin/MyCalendar" | ||
When "user0" requests calendar "admin/MyCalendar" on the endpoint "/remote.php/dav/calendars/" | ||
Then The CalDAV HTTP status code should be "404" | ||
And The exception is "Sabre\DAV\Exception\NotFound" | ||
And The error message is "Node with name 'MyCalendar' could not be found" | ||
|
||
# Blocked by https://github.com/php/php-src/pull/1417 | ||
#Scenario: Creating a new calendar | ||
# When "admin" creates a calendar named "MyCalendar" | ||
# Then The CalDAV HTTP status code should be "201" | ||
# And "admin" requests calendar "admin/MyCalendar" | ||
# Then The CalDAV HTTP status code should be "200" | ||
Scenario: Creating a new calendar | ||
When "admin" creates a calendar named "MyCalendar" | ||
Then The CalDAV HTTP status code should be "201" | ||
And "admin" requests calendar "admin/MyCalendar" on the endpoint "/remote.php/dav/calendars/" | ||
Then The CalDAV HTTP status code should be "207" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,36 @@ | ||
Feature: carddav | ||
Scenario: Accessing a not existing addressbook of another user | ||
Given user "user0" exists | ||
When "admin" requests addressbook "user0/MyAddressbook" with statuscode "404" | ||
When "admin" requests addressbook "user0/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/dav/addressbooks/users/" | ||
And The CardDAV exception is "Sabre\DAV\Exception\NotFound" | ||
And The CardDAV error message is "Addressbook with name 'MyAddressbook' could not be found" | ||
|
||
Scenario: Accessing a not shared addressbook of another user | ||
Given user "user0" exists | ||
Given "admin" creates an addressbook named "MyAddressbook" with statuscode "201" | ||
When "user0" requests addressbook "admin/MyAddressbook" with statuscode "404" | ||
When "user0" requests addressbook "admin/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/dav/addressbooks/users/" | ||
And The CardDAV exception is "Sabre\DAV\Exception\NotFound" | ||
And The CardDAV error message is "Addressbook with name 'MyAddressbook' could not be found" | ||
|
||
Scenario: Accessing a not existing addressbook of another user via legacy endpoint | ||
Given user "user0" exists | ||
When "admin" requests addressbook "user0/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/carddav/addressbooks/" | ||
And The CardDAV exception is "Sabre\DAV\Exception\NotFound" | ||
And The CardDAV error message is "Addressbook with name 'MyAddressbook' could not be found" | ||
|
||
Scenario: Accessing a not shared addressbook of another user via legacy endpoint | ||
Given user "user0" exists | ||
Given "admin" creates an addressbook named "MyAddressbook" with statuscode "201" | ||
When "user0" requests addressbook "admin/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/carddav/addressbooks/" | ||
And The CardDAV exception is "Sabre\DAV\Exception\NotFound" | ||
And The CardDAV error message is "Addressbook with name 'MyAddressbook' could not be found" | ||
|
||
Scenario: Accessing a not existing addressbook of myself | ||
Given user "user0" exists | ||
When "user0" requests addressbook "admin/MyAddressbook" with statuscode "404" | ||
When "user0" requests addressbook "admin/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/dav/addressbooks/users/" | ||
And The CardDAV exception is "Sabre\DAV\Exception\NotFound" | ||
And The CardDAV error message is "Addressbook with name 'MyAddressbook' could not be found" | ||
|
||
Scenario: Creating a new addressbook | ||
When "admin" creates an addressbook named "MyAddressbook" with statuscode "201" | ||
Then "admin" requests addressbook "admin/MyAddressbook" with statuscode "200" | ||
Then "admin" requests addressbook "admin/MyAddressbook" with statuscode "207" on the endpoint "/remote.php/dav/addressbooks/users/" |