summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests
diff options
context:
space:
mode:
authorGeorg Ehrke <developer@georgehrke.com>2018-10-16 14:39:04 +0200
committerGeorg Ehrke <developer@georgehrke.com>2018-10-22 15:48:13 +0200
commit325e366b581372b9f07a4bd00b7f874283c9f1f5 (patch)
tree251775ea595d40a4f52faaa2c2088d737fc9353d /apps/dav/tests
parentf737ae719de2e2af534bce03a8920bbb96aa8700 (diff)
downloadnextcloud-server-325e366b581372b9f07a4bd00b7f874283c9f1f5.tar.gz
nextcloud-server-325e366b581372b9f07a4bd00b7f874283c9f1f5.zip
add correct calendar-user-type to resource and room backend
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
Diffstat (limited to 'apps/dav/tests')
-rw-r--r--apps/dav/tests/unit/CalDAV/ResourceBooking/AbstractPrincipalBackendTest.php7
-rw-r--r--apps/dav/tests/unit/CalDAV/ResourceBooking/ResourcePrincipalBackendTest.php1
-rw-r--r--apps/dav/tests/unit/CalDAV/ResourceBooking/RoomPrincipalBackendTest.php1
3 files changed, 9 insertions, 0 deletions
diff --git a/apps/dav/tests/unit/CalDAV/ResourceBooking/AbstractPrincipalBackendTest.php b/apps/dav/tests/unit/CalDAV/ResourceBooking/AbstractPrincipalBackendTest.php
index 4dee0220fc8..aca36fb77ea 100644
--- a/apps/dav/tests/unit/CalDAV/ResourceBooking/AbstractPrincipalBackendTest.php
+++ b/apps/dav/tests/unit/CalDAV/ResourceBooking/AbstractPrincipalBackendTest.php
@@ -53,6 +53,9 @@ abstract class AbstractPrincipalBackendTest extends TestCase {
/** @var string */
protected $principalPrefix;
+ /** @var string */
+ protected $expectedCUType;
+
public function setUp() {
parent::setUp();
@@ -127,16 +130,19 @@ abstract class AbstractPrincipalBackendTest extends TestCase {
'uri' => $this->principalPrefix . '/db-123',
'{DAV:}displayname' => 'Resource 123',
'{http://sabredav.org/ns}email-address' => 'foo@bar.com',
+ '{urn:ietf:params:xml:ns:caldav}calendar-user-type' => $this->expectedCUType,
],
[
'uri' => $this->principalPrefix . '/ldap-123',
'{DAV:}displayname' => 'Resource 123 ldap',
'{http://sabredav.org/ns}email-address' => 'ldap@bar.com',
+ '{urn:ietf:params:xml:ns:caldav}calendar-user-type' => $this->expectedCUType,
],
[
'uri' => $this->principalPrefix . '/db-456',
'{DAV:}displayname' => 'Resource 456',
'{http://sabredav.org/ns}email-address' => 'bli@bar.com',
+ '{urn:ietf:params:xml:ns:caldav}calendar-user-type' => $this->expectedCUType,
],
], $actual);
@@ -209,6 +215,7 @@ abstract class AbstractPrincipalBackendTest extends TestCase {
'uri' => $this->principalPrefix . '/db-123',
'{DAV:}displayname' => 'Resource 123',
'{http://sabredav.org/ns}email-address' => 'foo@bar.com',
+ '{urn:ietf:params:xml:ns:caldav}calendar-user-type' => $this->expectedCUType,
], $actual);
}
diff --git a/apps/dav/tests/unit/CalDAV/ResourceBooking/ResourcePrincipalBackendTest.php b/apps/dav/tests/unit/CalDAV/ResourceBooking/ResourcePrincipalBackendTest.php
index 90db4bb4b7b..d3c774417c0 100644
--- a/apps/dav/tests/unit/CalDAV/ResourceBooking/ResourcePrincipalBackendTest.php
+++ b/apps/dav/tests/unit/CalDAV/ResourceBooking/ResourcePrincipalBackendTest.php
@@ -31,5 +31,6 @@ Class ResourcePrincipalBackendTest extends AbstractPrincipalBackendTest {
$this->userSession, $this->groupManager, $this->logger);
$this->expectedDbTable = 'calendar_resources';
$this->principalPrefix = 'principals/calendar-resources';
+ $this->expectedCUType = 'RESOURCE';
}
}
diff --git a/apps/dav/tests/unit/CalDAV/ResourceBooking/RoomPrincipalBackendTest.php b/apps/dav/tests/unit/CalDAV/ResourceBooking/RoomPrincipalBackendTest.php
index b55c6ddceb6..a10aaa26b35 100644
--- a/apps/dav/tests/unit/CalDAV/ResourceBooking/RoomPrincipalBackendTest.php
+++ b/apps/dav/tests/unit/CalDAV/ResourceBooking/RoomPrincipalBackendTest.php
@@ -31,5 +31,6 @@ Class RoomPrincipalBackendTest extends AbstractPrincipalBackendTest {
$this->userSession, $this->groupManager, $this->logger);
$this->expectedDbTable = 'calendar_rooms';
$this->principalPrefix = 'principals/calendar-rooms';
+ $this->expectedCUType = 'ROOM';
}
}