summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-11-18 17:29:30 +0100
committerVincent Petry <pvince81@owncloud.com>2013-11-18 18:09:01 +0100
commit614e4d485c8b74f6879c401f8cbb93e9335bf9b3 (patch)
tree7b30c6fe4da0b984525aec5e938e40cf6406a059 /tests
parent44c2f9aad2b475303b3bebb39f38954cb3210751 (diff)
downloadnextcloud-server-614e4d485c8b74f6879c401f8cbb93e9335bf9b3.tar.gz
nextcloud-server-614e4d485c8b74f6879c401f8cbb93e9335bf9b3.zip
External storage space is now not counted in total space
Added argument to getFileInfo() to disable adding the size of mountpoints to a directory's size. Fixes #5924
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/files/view.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/lib/files/view.php b/tests/lib/files/view.php
index 0cc86d6651a..f358c15dd50 100644
--- a/tests/lib/files/view.php
+++ b/tests/lib/files/view.php
@@ -67,6 +67,11 @@ class View extends \PHPUnit_Framework_TestCase {
$this->assertEquals($storageSize * 3, $cachedData['size']);
$this->assertEquals('httpd/unix-directory', $cachedData['mimetype']);
+ // get cached data excluding mount points
+ $cachedData = $rootView->getFileInfo('/', false);
+ $this->assertEquals($storageSize, $cachedData['size']);
+ $this->assertEquals('httpd/unix-directory', $cachedData['mimetype']);
+
$cachedData = $rootView->getFileInfo('/folder');
$this->assertEquals($storageSize + $textSize, $cachedData['size']);
$this->assertEquals('httpd/unix-directory', $cachedData['mimetype']);