summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-04-10 15:42:16 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-04-10 15:42:16 +0200
commit20a1a110de2e4bf84f00a3bb65e266e24d0c2e28 (patch)
tree4105d81a84727ac6a161efe6679493807a3ac8ca /apps
parenta163243e3116a0cf6ca1f186b461336e3fe64e14 (diff)
parent4a225aa12c58a9a2b4bc8dae71b1bd3cb74238ce (diff)
downloadnextcloud-server-20a1a110de2e4bf84f00a3bb65e266e24d0c2e28.tar.gz
nextcloud-server-20a1a110de2e4bf84f00a3bb65e266e24d0c2e28.zip
Merge pull request #15537 from owncloud/master-fixunittestrelatedtoorphanedshares2
Fix master unit test: 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);