summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2016-07-01 13:42:35 +0200
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-07-01 13:42:35 +0200
commit7d95cde37d8e26e1187a828f612addd8bba251a1 (patch)
tree48210b265e0a18fe1b207a65f2983a1c194f23d8 /apps/dav/tests
parent2d2d2267f7f38ca29e7b87f40fae62261614b0d1 (diff)
downloadnextcloud-server-7d95cde37d8e26e1187a828f612addd8bba251a1.tar.gz
nextcloud-server-7d95cde37d8e26e1187a828f612addd8bba251a1.zip
Add all properties while creating a subscription (#25318)
Fixes #24469
Diffstat (limited to 'apps/dav/tests')
-rw-r--r--apps/dav/tests/unit/CalDAV/CalDavBackendTest.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
index 977bdf15c8e..baa8540c43c 100644
--- a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
+++ b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
@@ -333,15 +333,20 @@ EOD;
public function testSubscriptions() {
$id = $this->backend->createSubscription(self::UNIT_TEST_USER, 'Subscription', [
- '{http://calendarserver.org/ns/}source' => new Href('test-source')
+ '{http://calendarserver.org/ns/}source' => new Href('test-source'),
+ '{http://apple.com/ns/ical/}calendar-color' => '#1C4587',
+ '{http://calendarserver.org/ns/}subscribed-strip-todos' => ''
]);
$subscriptions = $this->backend->getSubscriptionsForUser(self::UNIT_TEST_USER);
$this->assertEquals(1, count($subscriptions));
+ $this->assertEquals('#1C4587', $subscriptions[0]['{http://apple.com/ns/ical/}calendar-color']);
+ $this->assertEquals(true, $subscriptions[0]['{http://calendarserver.org/ns/}subscribed-strip-todos']);
$this->assertEquals($id, $subscriptions[0]['id']);
$patch = new PropPatch([
'{DAV:}displayname' => 'Unit test',
+ '{http://apple.com/ns/ical/}calendar-color' => '#ac0606',
]);
$this->backend->updateSubscription($id, $patch);
$patch->commit();
@@ -350,6 +355,7 @@ EOD;
$this->assertEquals(1, count($subscriptions));
$this->assertEquals($id, $subscriptions[0]['id']);
$this->assertEquals('Unit test', $subscriptions[0]['{DAV:}displayname']);
+ $this->assertEquals('#ac0606', $subscriptions[0]['{http://apple.com/ns/ical/}calendar-color']);
$this->backend->deleteSubscription($id);
$subscriptions = $this->backend->getSubscriptionsForUser(self::UNIT_TEST_USER);