summaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-07-28 14:19:39 +0200
committerLukas Reschke <lukas@statuscode.ch>2016-09-20 11:26:09 +0200
commit6eb1bc55ab24cf1cfae5995d5fbb976120df32d5 (patch)
treebc9ed5c0bd48218ee80178605b5635057b0f6f60 /apps/dav
parent09e1218df939ffb28160d054bed28af8fc29113e (diff)
downloadnextcloud-server-6eb1bc55ab24cf1cfae5995d5fbb976120df32d5.tar.gz
nextcloud-server-6eb1bc55ab24cf1cfae5995d5fbb976120df32d5.zip
The birthday calendar can only hold VEVENT - refs https://github.com/owncloud/tasks/issues/338
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/CalDAV/BirthdayService.php1
-rw-r--r--apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php11
2 files changed, 12 insertions, 0 deletions
diff --git a/apps/dav/lib/CalDAV/BirthdayService.php b/apps/dav/lib/CalDAV/BirthdayService.php
index 31a6c73f484..cadaca0bdb9 100644
--- a/apps/dav/lib/CalDAV/BirthdayService.php
+++ b/apps/dav/lib/CalDAV/BirthdayService.php
@@ -116,6 +116,7 @@ class BirthdayService {
$this->calDavBackEnd->createCalendar($principal, self::BIRTHDAY_CALENDAR_URI, [
'{DAV:}displayname' => 'Contact birthdays',
'{http://apple.com/ns/ical/}calendar-color' => '#FFFFCA',
+ 'components' => 'VEVENT',
]);
return $this->calDavBackEnd->getCalendarByUri($principal, self::BIRTHDAY_CALENDAR_URI);
diff --git a/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php b/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php
index 33968ec242d..7c772184fef 100644
--- a/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php
+++ b/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php
@@ -182,6 +182,17 @@ class BirthdayServiceTest extends TestCase {
], $users);
}
+ public function testBirthdayCalendarHasComponentEvent() {
+ $this->calDav->expects($this->once())
+ ->method('createCalendar')
+ ->with('principal001', 'contact_birthdays', [
+ '{DAV:}displayname' => 'Contact birthdays',
+ '{http://apple.com/ns/ical/}calendar-color' => '#FFFFCA',
+ 'components' => 'VEVENT',
+ ]);
+ $this->service->ensureCalendarExists('principal001');
+ }
+
public function providesBirthday() {
return [
[true,