Skip to content

Commit

Permalink
Test schedule-calendar-transp
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepDiver1975 committed Jul 9, 2018
1 parent 69b1d49 commit f2d661a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/dav/tests/unit/CalDAV/AbstractCalDavBackendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
use OCA\DAV\DAV\GroupPrincipalBackend;
use OCP\IConfig;
use OCP\Security\ISecureRandom;
use Sabre\CalDAV\Xml\Property\ScheduleCalendarTransp;
use Sabre\CalDAV\Xml\Property\SupportedCalendarComponentSet;
use Test\TestCase;

Expand Down Expand Up @@ -104,7 +105,8 @@ public function tearDown() {
*/
protected function createTestCalendar() {
$this->backend->createCalendar(self::UNIT_TEST_USER, 'Example', [
'{http://apple.com/ns/ical/}calendar-color' => '#1C4587FF'
'{http://apple.com/ns/ical/}calendar-color' => '#1C4587FF',
'{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp' => new ScheduleCalendarTransp('opaque')
]);
$calendars = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER);
$this->assertCount(1, $calendars);
Expand All @@ -114,6 +116,8 @@ protected function createTestCalendar() {
$this->assertEquals(['VEVENT','VTODO'], $components->getValue());
$color = $calendars[0]['{http://apple.com/ns/ical/}calendar-color'];
$this->assertEquals('#1C4587FF', $color);
$transparent = $calendars[0]['{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp'];
self::assertEquals(new ScheduleCalendarTransp('opaque'), $transparent);
$this->assertEquals('Example', $calendars[0]['uri']);
$this->assertEquals('Example', $calendars[0]['{DAV:}displayname']);
return $calendars[0]['id'];
Expand Down

0 comments on commit f2d661a

Please sign in to comment.