diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-11-21 22:54:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-21 22:54:17 +0100 |
commit | d0c3c5cee333c863af1e7971af2c6ef2d04cfd9a (patch) | |
tree | f6d64d524b40fec676fbe0e62c6824fe893ee2d5 /apps/dav/tests | |
parent | de0df3cfd9e14740c0541c49bc167510f17ae916 (diff) | |
parent | 3a8c4230be2d7311ca012f09538cdad2147fae75 (diff) | |
download | nextcloud-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.php | 25 |
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' ]; |