summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/tests/unit/CalDAV/CalDavBackendTest.php')
-rw-r--r--apps/dav/tests/unit/CalDAV/CalDavBackendTest.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
index 44609f2ca6c..1b2169b6675 100644
--- a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
+++ b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
@@ -983,4 +983,21 @@ EOD;
$this->assertEquals(null, $this->backend->getCalendarObject($subscriptionId, $uri, CalDavBackend::CALENDAR_TYPE_SUBSCRIPTION));
}
+
+ public function testCalendarMovement()
+ {
+ $this->backend->createCalendar(self::UNIT_TEST_USER, 'Example', []);
+
+ $this->assertCount(1, $this->backend->getCalendarsForUser(self::UNIT_TEST_USER));
+
+ $calendarInfoUser = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER)[0];
+
+ $this->backend->moveCalendar('Example', self::UNIT_TEST_USER, self::UNIT_TEST_USER1);
+ $this->assertCount(0, $this->backend->getCalendarsForUser(self::UNIT_TEST_USER));
+ $this->assertCount(1, $this->backend->getCalendarsForUser(self::UNIT_TEST_USER1));
+
+ $calendarInfoUser1 = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER1)[0];
+ $this->assertEquals($calendarInfoUser['id'], $calendarInfoUser1['id']);
+ $this->assertEquals($calendarInfoUser['uri'], $calendarInfoUser1['uri']);
+ }
}