summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-02-09 15:03:15 +0100
committerJoas Schilling <nickvergessen@owncloud.com>2016-02-29 16:49:55 +0100
commit95e218b00c9526bf3cba8ce719b09b1ea9d49ba9 (patch)
treeee79f3605da9052aba89d39cbaaed31d1f333bae /apps/dav/tests
parentd98217d8ba90fd0082b055d55e96c03fac9bb4c3 (diff)
downloadnextcloud-server-95e218b00c9526bf3cba8ce719b09b1ea9d49ba9.tar.gz
nextcloud-server-95e218b00c9526bf3cba8ce719b09b1ea9d49ba9.zip
For 9.0 we don't have the possibility to store calendar and addressbook properties on a per-user basis and therefore we simple don't allow this for now
Diffstat (limited to 'apps/dav/tests')
-rw-r--r--apps/dav/tests/unit/caldav/calendartest.php16
-rw-r--r--apps/dav/tests/unit/carddav/addressbooktest.php16
2 files changed, 32 insertions, 0 deletions
diff --git a/apps/dav/tests/unit/caldav/calendartest.php b/apps/dav/tests/unit/caldav/calendartest.php
index 4a3c94e8aba..4a4de51e60a 100644
--- a/apps/dav/tests/unit/caldav/calendartest.php
+++ b/apps/dav/tests/unit/caldav/calendartest.php
@@ -23,6 +23,7 @@ namespace OCA\DAV\Tests\Unit\CalDAV;
use OCA\DAV\CalDAV\CalDavBackend;
use OCA\DAV\CalDAV\Calendar;
+use Sabre\DAV\PropPatch;
use Test\TestCase;
class CalendarTest extends TestCase {
@@ -63,4 +64,19 @@ class CalendarTest extends TestCase {
$c = new Calendar($backend, $calendarInfo);
$c->delete();
}
+
+ /**
+ * @expectedException \Sabre\DAV\Exception\Forbidden
+ */
+ public function testPropPatch() {
+ /** @var \PHPUnit_Framework_MockObject_MockObject | CalDavBackend $backend */
+ $backend = $this->getMockBuilder('OCA\DAV\CalDAV\CalDavBackend')->disableOriginalConstructor()->getMock();
+ $calendarInfo = [
+ '{http://owncloud.org/ns}owner-principal' => 'user1',
+ 'principaluri' => 'user2',
+ 'id' => 666
+ ];
+ $c = new Calendar($backend, $calendarInfo);
+ $c->propPatch(new PropPatch([]));
+ }
}
diff --git a/apps/dav/tests/unit/carddav/addressbooktest.php b/apps/dav/tests/unit/carddav/addressbooktest.php
index d714fc71679..854c121a95d 100644
--- a/apps/dav/tests/unit/carddav/addressbooktest.php
+++ b/apps/dav/tests/unit/carddav/addressbooktest.php
@@ -23,6 +23,7 @@ namespace OCA\DAV\Tests\Unit\CardDAV;
use OCA\DAV\CardDAV\AddressBook;
use OCA\DAV\CardDAV\CardDavBackend;
+use Sabre\DAV\PropPatch;
use Test\TestCase;
class AddressBookTest extends TestCase {
@@ -61,4 +62,19 @@ class AddressBookTest extends TestCase {
$c = new AddressBook($backend, $calendarInfo);
$c->delete();
}
+
+ /**
+ * @expectedException \Sabre\DAV\Exception\Forbidden
+ */
+ public function testPropPatch() {
+ /** @var \PHPUnit_Framework_MockObject_MockObject | CardDavBackend $backend */
+ $backend = $this->getMockBuilder('OCA\DAV\CardDAV\CardDavBackend')->disableOriginalConstructor()->getMock();
+ $calendarInfo = [
+ '{http://owncloud.org/ns}owner-principal' => 'user1',
+ 'principaluri' => 'user2',
+ 'id' => 666
+ ];
+ $c = new AddressBook($backend, $calendarInfo);
+ $c->propPatch(new PropPatch([]));
+ }
}