diff --git a/apps/dav/lib/CalDAV/BirthdayService.php b/apps/dav/lib/CalDAV/BirthdayService.php index 31a6c73f48..cadaca0bdb 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 33968ec242..7c772184fe 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,