diff options
author | Vincent Petry <pvince81@owncloud.com> | 2013-11-06 11:57:04 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2013-11-21 12:04:54 +0100 |
commit | 356eef07398f8829a2558eee809599be60441b59 (patch) | |
tree | 29ff768c8b73af5f73d75610dedbf4c6231bb28a /apps | |
parent | 391f267d380f0d098d730d3bc74633192cc13570 (diff) | |
download | nextcloud-server-356eef07398f8829a2558eee809599be60441b59.tar.gz nextcloud-server-356eef07398f8829a2558eee809599be60441b59.zip |
Quota storage wrapper is now used for all users in sharing mode
When accessing a shared folder, the folder's owner appears as mountpoint
but wasn't wrapped by a quota storage wrapper.
This fix makes sure that all home storages are wrapped by a quota
storage wrapper, if applicable, to make sure quotas are respected when
uploading into shared folders.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/tests/ajax_rename.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/files/tests/ajax_rename.php b/apps/files/tests/ajax_rename.php index e654255c407..3735b0a49c8 100644 --- a/apps/files/tests/ajax_rename.php +++ b/apps/files/tests/ajax_rename.php @@ -22,9 +22,18 @@ */ class Test_OC_Files_App_Rename extends \PHPUnit_Framework_TestCase { + private static $user; function setUp() { // mock OC_L10n + if (!self::$user) { + self::$user = uniqid(); + } + \OC_User::createUser(self::$user, 'password'); + \OC_User::setUserId(self::$user); + + \OC\Files\Filesystem::init(self::$user, '/' . self::$user . '/files'); + $l10nMock = $this->getMock('\OC_L10N', array('t'), array(), '', false); $l10nMock->expects($this->any()) ->method('t') @@ -39,6 +48,12 @@ class Test_OC_Files_App_Rename extends \PHPUnit_Framework_TestCase { $this->files = new \OCA\Files\App($viewMock, $l10nMock); } + function tearDown() { + $result = \OC_User::deleteUser(self::$user); + $this->assertTrue($result); + \OC\Files\Filesystem::tearDown(); + } + /** * @brief test rename of file/folder named "Shared" */ |