summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/tests/unit/CalDAV/CalDavBackendTest.php')
-rw-r--r--apps/dav/tests/unit/CalDAV/CalDavBackendTest.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
index a597b476336..0c07ed7c292 100644
--- a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
+++ b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
@@ -343,13 +343,24 @@ EOD;
->disableOriginalConstructor()->getMock();
$calendar = new Calendar($this->backend, $calendarInfo, $l10n);
- $this->backend->setPublishStatus(true, $calendar);
- $this->assertEquals(true, $this->backend->getPublishStatus($calendar));
+ $calendar->setPublishStatus(true);
+ $this->assertEquals(true, $calendar->getPublishStatus());
$publicCalendars = $this->backend->getPublicCalendars();
$this->assertEquals(1, count($publicCalendars));
$this->assertEquals(true, $publicCalendars[0]['{http://owncloud.org/ns}public']);
+ $publicCalendarURI = md5($this->config->getSystemValue('secret', '') . $calendar->getResourceId());
+ $publicCalendar = $this->backend->getPublicCalendar($publicCalendarURI);
+ $this->assertEquals(true, $publicCalendar['{http://owncloud.org/ns}public']);
+
+ $calendar->setPublishStatus(false);
+ $this->assertEquals(false, $calendar->getPublishStatus());
+
+ $publicCalendarURI = md5($this->config->getSystemValue('secret', '') . $calendar->getResourceId());
+ $this->setExpectedException('Sabre\DAV\Exception\NotFound');
+ $publicCalendar = $this->backend->getPublicCalendar($publicCalendarURI);
+
}
public function testSubscriptions() {