summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit
diff options
context:
space:
mode:
authorThomas Müller <DeepDiver1975@users.noreply.github.com>2016-07-21 15:58:46 +0200
committerGitHub <noreply@github.com>2016-07-21 15:58:46 +0200
commit9f2117613d41a81e703eded9cbb5be260c5b4b5e (patch)
treed8485743feae3ad4be05cfbfcd51c6db8ba26c85 /apps/dav/tests/unit
parent1550ae93ef3b63ef80247669cf2390fa76c917db (diff)
downloadnextcloud-server-9f2117613d41a81e703eded9cbb5be260c5b4b5e.tar.gz
nextcloud-server-9f2117613d41a81e703eded9cbb5be260c5b4b5e.zip
Add all properties while creating a subscription (#25318) (#25335)
Fixes #24469
Diffstat (limited to 'apps/dav/tests/unit')
-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);