diff options
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/l10n/hr.js | 4 | ||||
-rw-r--r-- | apps/dav/l10n/hr.json | 4 | ||||
-rw-r--r-- | apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php | 35 |
3 files changed, 29 insertions, 14 deletions
diff --git a/apps/dav/l10n/hr.js b/apps/dav/l10n/hr.js index 59a0f4e64fe..4176714ba01 100644 --- a/apps/dav/l10n/hr.js +++ b/apps/dav/l10n/hr.js @@ -76,8 +76,12 @@ OC.L10N.register( "Your %s needs to be configured to use HTTPS in order to use CalDAV and CardDAV with iOS/macOS." : "Vaš %s treba konfigurirati za korištenje HTTPS-a kako bi se mogli upotrebljavati CalDAV i CardDAV s operacijskim sustavom iOS/macOS.", "Configures a CalDAV account" : "Konfigurira CalDAV račun", "Configures a CardDAV account" : "Konfigurira CardDAV račun", + "Events" : "Događaji", "Tasks" : "Zadaci", "Untitled task" : "Zadatak bez naslova", + "Completed on %s" : "Završeno na %s", + "Due on %s by %s" : "%s treba završiti do %s", + "Due on %s" : "Treba završiti do %s", "WebDAV" : "WebDAV", "WebDAV endpoint" : "WebDAV krajnja točka", "There was an error updating your attendance status." : "Došlo je do pogreške prilikom ažuriranja statusa prisutnosti.", diff --git a/apps/dav/l10n/hr.json b/apps/dav/l10n/hr.json index be7e628d1d8..9627e2589db 100644 --- a/apps/dav/l10n/hr.json +++ b/apps/dav/l10n/hr.json @@ -74,8 +74,12 @@ "Your %s needs to be configured to use HTTPS in order to use CalDAV and CardDAV with iOS/macOS." : "Vaš %s treba konfigurirati za korištenje HTTPS-a kako bi se mogli upotrebljavati CalDAV i CardDAV s operacijskim sustavom iOS/macOS.", "Configures a CalDAV account" : "Konfigurira CalDAV račun", "Configures a CardDAV account" : "Konfigurira CardDAV račun", + "Events" : "Događaji", "Tasks" : "Zadaci", "Untitled task" : "Zadatak bez naslova", + "Completed on %s" : "Završeno na %s", + "Due on %s by %s" : "%s treba završiti do %s", + "Due on %s" : "Treba završiti do %s", "WebDAV" : "WebDAV", "WebDAV endpoint" : "WebDAV krajnja točka", "There was an error updating your attendance status." : "Došlo je do pogreške prilikom ažuriranja statusa prisutnosti.", diff --git a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php index 528327a681a..641b03e0781 100644 --- a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php @@ -31,6 +31,7 @@ use OC\Files\FileInfo; use OC\Files\Storage\Wrapper\Quota; use OCA\DAV\Connector\Sabre\Directory; use OCP\Files\ForbiddenException; +use OCP\Files\Mount\IMountPoint; class TestViewDirectory extends \OC\Files\View { @@ -98,7 +99,7 @@ class DirectoryTest extends \Test\TestCase { return new Directory($this->view, $this->info); } - + public function testDeleteRootFolderFails() { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); @@ -111,7 +112,7 @@ class DirectoryTest extends \Test\TestCase { $dir->delete(); } - + public function testDeleteForbidden() { $this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class); @@ -130,7 +131,7 @@ class DirectoryTest extends \Test\TestCase { $dir->delete(); } - + public function testDeleteFolderWhenAllowed() { // deletion allowed $this->info->expects($this->once()) @@ -147,7 +148,7 @@ class DirectoryTest extends \Test\TestCase { $dir->delete(); } - + public function testDeleteFolderFailsWhenNotAllowed() { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); @@ -159,7 +160,7 @@ class DirectoryTest extends \Test\TestCase { $dir->delete(); } - + public function testDeleteFolderThrowsWhenDeletionFailed() { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); @@ -217,7 +218,7 @@ class DirectoryTest extends \Test\TestCase { $dir->getChildren(); } - + public function testGetChildrenNoPermission() { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); @@ -230,7 +231,7 @@ class DirectoryTest extends \Test\TestCase { $dir->getChildren(); } - + public function testGetChildNoPermission() { $this->expectException(\Sabre\DAV\Exception\NotFound::class); @@ -242,7 +243,7 @@ class DirectoryTest extends \Test\TestCase { $dir->getChild('test'); } - + public function testGetChildThrowStorageNotAvailableException() { $this->expectException(\Sabre\DAV\Exception\ServiceUnavailable::class); @@ -254,7 +255,7 @@ class DirectoryTest extends \Test\TestCase { $dir->getChild('.'); } - + public function testGetChildThrowInvalidPath() { $this->expectException(\OCA\DAV\Connector\Sabre\Exception\InvalidPath::class); @@ -269,9 +270,12 @@ class DirectoryTest extends \Test\TestCase { } public function testGetQuotaInfoUnlimited() { + $mountPoint = $this->createMock(IMountPoint::class); $storage = $this->getMockBuilder(Quota::class) ->disableOriginalConstructor() ->getMock(); + $mountPoint->method('getStorage') + ->willReturn($storage); $storage->expects($this->any()) ->method('instanceOfStorage') @@ -292,17 +296,20 @@ class DirectoryTest extends \Test\TestCase { ->will($this->returnValue(200)); $this->info->expects($this->once()) - ->method('getStorage') - ->will($this->returnValue($storage)); + ->method('getMountPoint') + ->willReturn($mountPoint); $dir = new Directory($this->view, $this->info); $this->assertEquals([200, -3], $dir->getQuotaInfo()); //200 used, unlimited } public function testGetQuotaInfoSpecific() { + $mountPoint = $this->createMock(IMountPoint::class); $storage = $this->getMockBuilder(Quota::class) ->disableOriginalConstructor() ->getMock(); + $mountPoint->method('getStorage') + ->willReturn($storage); $storage->expects($this->any()) ->method('instanceOfStorage') @@ -324,8 +331,8 @@ class DirectoryTest extends \Test\TestCase { ->will($this->returnValue(200)); $this->info->expects($this->once()) - ->method('getStorage') - ->will($this->returnValue($storage)); + ->method('getMountPoint') + ->willReturn($mountPoint); $dir = new Directory($this->view, $this->info); $this->assertEquals([200, 800], $dir->getQuotaInfo()); //200 used, 800 free @@ -404,7 +411,7 @@ class DirectoryTest extends \Test\TestCase { $this->assertTrue($targetNode->moveInto(basename($destination), $source, $sourceNode)); } - + public function testFailingMove() { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); $this->expectExceptionMessage('Could not copy directory b, target exists'); |