diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2016-11-04 15:40:59 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-11-04 15:40:59 +0100 |
commit | 1e6175dfcbb7a0c554fecf62c2d31a422df841e6 (patch) | |
tree | aa2e7fc6a465742b2bf6aa8ce0e6596b57052640 /apps/dav/tests/unit/CalDAV | |
parent | c016d947e2243329243b62a41caab82a4ff46a10 (diff) | |
download | nextcloud-server-1e6175dfcbb7a0c554fecf62c2d31a422df841e6.tar.gz nextcloud-server-1e6175dfcbb7a0c554fecf62c2d31a422df841e6.zip |
Fix CalendarTest
* Made sure delete from self works again (and is tested)
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/dav/tests/unit/CalDAV')
-rw-r--r-- | apps/dav/tests/unit/CalDAV/CalendarTest.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/apps/dav/tests/unit/CalDAV/CalendarTest.php b/apps/dav/tests/unit/CalDAV/CalendarTest.php index bd4c1f6aabb..e585a23a9a2 100644 --- a/apps/dav/tests/unit/CalDAV/CalendarTest.php +++ b/apps/dav/tests/unit/CalDAV/CalendarTest.php @@ -85,6 +85,25 @@ class CalendarTest extends TestCase { $c->delete(); } + public function testDeleteOwn() { + /** @var \PHPUnit_Framework_MockObject_MockObject | CalDavBackend $backend */ + $backend = $this->createMock(CalDavBackend::class); + $backend->expects($this->never())->method('updateShares'); + $backend->expects($this->never())->method('getShares'); + + $backend->expects($this->once())->method('deleteCalendar') + ->with(666); + + $calendarInfo = [ + '{http://owncloud.org/ns}owner-principal' => 'user1', + 'principaluri' => 'user1', + 'id' => 666, + 'uri' => 'cal', + ]; + $c = new Calendar($backend, $calendarInfo, $this->l10n); + $c->delete(); + } + public function dataPropPatch() { return [ [[], true], |