Skip to content

Commit

Permalink
The birthday calendar can only hold VEVENT - refs owncloud/tasks#338
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepDiver1975 authored and LukasReschke committed Sep 20, 2016
1 parent 09e1218 commit 6eb1bc5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions apps/dav/lib/CalDAV/BirthdayService.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public function ensureCalendarExists($principal) {
$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);
Expand Down
11 changes: 11 additions & 0 deletions apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,17 @@ public function testGetAllAffectedPrincipals() {
], $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,
Expand Down

0 comments on commit 6eb1bc5

Please sign in to comment.