diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-02 13:07:14 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-03 17:18:22 +0100 |
commit | ef06d6bdaaa5b0686bd1f6fb32866cfe36481434 (patch) | |
tree | fd4f0af1f6a345ce28a2accd3c670264136075ff /apps/dav/tests/unit | |
parent | 6f933fde60f58afd4bfa0c9b1e121671e7775705 (diff) | |
download | nextcloud-server-ef06d6bdaaa5b0686bd1f6fb32866cfe36481434.tar.gz nextcloud-server-ef06d6bdaaa5b0686bd1f6fb32866cfe36481434.zip |
Deleting a shared calendar results in unshare
Diffstat (limited to 'apps/dav/tests/unit')
-rw-r--r-- | apps/dav/tests/unit/caldav/calendartest.php | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/apps/dav/tests/unit/caldav/calendartest.php b/apps/dav/tests/unit/caldav/calendartest.php new file mode 100644 index 00000000000..561ce6c8351 --- /dev/null +++ b/apps/dav/tests/unit/caldav/calendartest.php @@ -0,0 +1,41 @@ +<?php +/** + * @author Thomas Müller <thomas.mueller@tmit.eu> + * + * @copyright Copyright (c) 2016, ownCloud, Inc. + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + +namespace OCA\DAV\Tests\Unit\CalDAV; + +use OCA\DAV\CalDAV\CalDavBackend; +use OCA\DAV\CalDAV\Calendar; +use Test\TestCase; + +class CalendarTest extends TestCase { + + public function testDelete() { + /** @var \PHPUnit_Framework_MockObject_MockObject | CalDavBackend $backend */ + $backend = $this->getMockBuilder('OCA\DAV\CalDAV\CalDavBackend')->disableOriginalConstructor()->getMock(); + $backend->expects($this->once())->method('updateShares'); + $calendarInfo = [ + '{http://owncloud.org/ns}owner-principal' => 'user1', + 'principaluri' => 'user2', + ]; + $c = new Calendar($backend, $calendarInfo); + $c->delete(); + } +} |