diff options
author | Thomas Citharel <tcit@tcit.fr> | 2016-07-20 14:08:45 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-09-26 11:55:38 +0200 |
commit | 77216e7ca97e763ab12d30c471d0a73b44faeeba (patch) | |
tree | aea85e1073c10cfc010ae8fa105ef690990bb86d /apps/dav/tests/unit/CalDAV/CalDavBackendTest.php | |
parent | d0ec6b9c15bcae0226fb46ab99d70897b0b96c4b (diff) | |
download | nextcloud-server-77216e7ca97e763ab12d30c471d0a73b44faeeba.tar.gz nextcloud-server-77216e7ca97e763ab12d30c471d0a73b44faeeba.zip |
a few tests
Diffstat (limited to 'apps/dav/tests/unit/CalDAV/CalDavBackendTest.php')
-rw-r--r-- | apps/dav/tests/unit/CalDAV/CalDavBackendTest.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php index 1a5673161de..a597b476336 100644 --- a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php +++ b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php @@ -334,6 +334,24 @@ EOD; $this->assertEquals($event, $changes['added'][0]); } + public function testPublications() { + $this->backend->createCalendar(self::UNIT_TEST_USER, 'Example', []); + + $calendarInfo = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER)[0]; + + $l10n = $this->getMockBuilder('\OCP\IL10N') + ->disableOriginalConstructor()->getMock(); + + $calendar = new Calendar($this->backend, $calendarInfo, $l10n); + $this->backend->setPublishStatus(true, $calendar); + $this->assertEquals(true, $this->backend->getPublishStatus($calendar)); + + $publicCalendars = $this->backend->getPublicCalendars(); + $this->assertEquals(1, count($publicCalendars)); + $this->assertEquals(true, $publicCalendars[0]['{http://owncloud.org/ns}public']); + + } + public function testSubscriptions() { $id = $this->backend->createSubscription(self::UNIT_TEST_USER, 'Subscription', [ '{http://calendarserver.org/ns/}source' => new Href('test-source'), |