aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/tests
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-01-26 12:22:22 +0100
committerVincent Petry <pvince81@owncloud.com>2015-01-26 12:22:22 +0100
commit02b9bad81b51a37dd60cab34b80796c79390c426 (patch)
tree2021e5f7b51d3708e73cf0ce612069c6fc215bf9 /apps/files_trashbin/tests
parenta1cc9eea56a39646e679fd42b6a33249f9aad170 (diff)
downloadnextcloud-server-02b9bad81b51a37dd60cab34b80796c79390c426.tar.gz
nextcloud-server-02b9bad81b51a37dd60cab34b80796c79390c426.zip
Fix bogus deletion on copy + unlink through rename
Cross-storage rename would cause copy + unlink. That unlink operation must not trigger the trashbin.
Diffstat (limited to 'apps/files_trashbin/tests')
-rw-r--r--apps/files_trashbin/tests/storage.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files_trashbin/tests/storage.php b/apps/files_trashbin/tests/storage.php
index 050d5fcee5b..d9a18e5a15c 100644
--- a/apps/files_trashbin/tests/storage.php
+++ b/apps/files_trashbin/tests/storage.php
@@ -37,6 +37,9 @@ class Storage extends \Test\TestCase {
protected function setUp() {
parent::setUp();
+ \OC_Hook::clear();
+ \OCA\Files_Trashbin\Trashbin::registerHooks();
+
$this->user = $this->getUniqueId('user');
\OC::$server->getUserManager()->createUser($this->user, $this->user);
@@ -58,6 +61,7 @@ class Storage extends \Test\TestCase {
\OC\Files\Filesystem::mount($this->originalStorage, array(), '/');
$this->logout();
\OC_User::deleteUser($this->user);
+ \OC_Hook::clear();
parent::tearDown();
}