summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-04-10 13:43:57 +0200
committerVincent Petry <pvince81@owncloud.com>2015-04-10 14:53:17 +0200
commit4a225aa12c58a9a2b4bc8dae71b1bd3cb74238ce (patch)
tree7d99dce15de93e81e69e4ea6ba6d94ebe629ea7d /apps
parent79ef54fe00ad099944291acd869e058ce12daec6 (diff)
downloadnextcloud-server-4a225aa12c58a9a2b4bc8dae71b1bd3cb74238ce.tar.gz
nextcloud-server-4a225aa12c58a9a2b4bc8dae71b1bd3cb74238ce.zip
Clear leftover shares from other tests
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/tests/deleteorphanedsharesjobtest.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files_sharing/tests/deleteorphanedsharesjobtest.php b/apps/files_sharing/tests/deleteorphanedsharesjobtest.php
index 20f3bcd5ebd..8b5afcb9149 100644
--- a/apps/files_sharing/tests/deleteorphanedsharesjobtest.php
+++ b/apps/files_sharing/tests/deleteorphanedsharesjobtest.php
@@ -70,6 +70,8 @@ class DeleteOrphanedSharesJobTest extends \Test\TestCase {
parent::setUp();
$this->connection = \OC::$server->getDatabaseConnection();
+ // clear occasional leftover shares from other tests
+ $this->connection->executeUpdate('DELETE FROM `*PREFIX*share`');
$this->user1 = $this->getUniqueID('user1_');
$this->user2 = $this->getUniqueID('user2_');
@@ -84,7 +86,7 @@ class DeleteOrphanedSharesJobTest extends \Test\TestCase {
}
protected function tearDown() {
- $this->connection->executeUpdate('DELETE FROM `*PREFIX*share` WHERE `item_type` in (\'file\', \'folder\')');
+ $this->connection->executeUpdate('DELETE FROM `*PREFIX*share`');
$userManager = \OC::$server->getUserManager();
$user1 = $userManager->get($this->user1);