summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-11-21 22:54:17 +0100
committerGitHub <noreply@github.com>2016-11-21 22:54:17 +0100
commitd0c3c5cee333c863af1e7971af2c6ef2d04cfd9a (patch)
treef6d64d524b40fec676fbe0e62c6824fe893ee2d5 /apps/dav/tests
parentde0df3cfd9e14740c0541c49bc167510f17ae916 (diff)
parent3a8c4230be2d7311ca012f09538cdad2147fae75 (diff)
downloadnextcloud-server-d0c3c5cee333c863af1e7971af2c6ef2d04cfd9a.tar.gz
nextcloud-server-d0c3c5cee333c863af1e7971af2c6ef2d04cfd9a.zip
Merge pull request #2225 from nextcloud/fix_caldav_proppatch_requests
fix PropPatch requests on calendars
Diffstat (limited to 'apps/dav/tests')
-rw-r--r--apps/dav/tests/unit/CalDAV/CalendarTest.php25
1 files changed, 18 insertions, 7 deletions
diff --git a/apps/dav/tests/unit/CalDAV/CalendarTest.php b/apps/dav/tests/unit/CalDAV/CalendarTest.php
index e585a23a9a2..d0fb2d19243 100644
--- a/apps/dav/tests/unit/CalDAV/CalendarTest.php
+++ b/apps/dav/tests/unit/CalDAV/CalendarTest.php
@@ -106,29 +106,40 @@ class CalendarTest extends TestCase {
public function dataPropPatch() {
return [
- [[], true],
- [[
+ ['user1', 'user2', [], true],
+ ['user1', 'user2', [
'{http://owncloud.org/ns}calendar-enabled' => true,
], false],
- [[
+ ['user1', 'user2', [
'{DAV:}displayname' => true,
], true],
- [[
+ ['user1', 'user2', [
'{DAV:}displayname' => true,
'{http://owncloud.org/ns}calendar-enabled' => true,
], true],
+ ['user1', 'user1', [], false],
+ ['user1', 'user1', [
+ '{http://owncloud.org/ns}calendar-enabled' => true,
+ ], false],
+ ['user1', 'user1', [
+ '{DAV:}displayname' => true,
+ ], false],
+ ['user1', 'user1', [
+ '{DAV:}displayname' => true,
+ '{http://owncloud.org/ns}calendar-enabled' => true,
+ ], false],
];
}
/**
* @dataProvider dataPropPatch
*/
- public function testPropPatch($mutations, $throws) {
+ public function testPropPatch($ownerPrincipal, $principalUri, $mutations, $throws) {
/** @var \PHPUnit_Framework_MockObject_MockObject | CalDavBackend $backend */
$backend = $this->getMockBuilder(CalDavBackend::class)->disableOriginalConstructor()->getMock();
$calendarInfo = [
- '{http://owncloud.org/ns}owner-principal' => 'user1',
- 'principaluri' => 'user2',
+ '{http://owncloud.org/ns}owner-principal' => $ownerPrincipal,
+ 'principaluri' => $principalUri,
'id' => 666,
'uri' => 'default'
];