summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-05-11 15:22:05 +0200
committerVincent Petry <pvince81@owncloud.com>2015-05-18 12:11:31 +0200
commit415f16eb24138e75be25f66ac261dd08cb269cc9 (patch)
treea630ad0c4264cfcba59b102e264e9242432babb1 /apps/files_sharing
parent077d41a9ce2419c4bfd1ab5863672386e0cf761a (diff)
downloadnextcloud-server-415f16eb24138e75be25f66ac261dd08cb269cc9.tar.gz
nextcloud-server-415f16eb24138e75be25f66ac261dd08cb269cc9.zip
fix tests
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/tests/controller/sharecontroller.php5
-rw-r--r--apps/files_sharing/tests/testcase.php1
2 files changed, 2 insertions, 4 deletions
diff --git a/apps/files_sharing/tests/controller/sharecontroller.php b/apps/files_sharing/tests/controller/sharecontroller.php
index 64ee5b8ce51..3a8a282b9a0 100644
--- a/apps/files_sharing/tests/controller/sharecontroller.php
+++ b/apps/files_sharing/tests/controller/sharecontroller.php
@@ -78,10 +78,7 @@ class ShareControllerTest extends \Test\TestCase {
\OC_User::createUser($this->user, $this->user);
\OC_Util::tearDownFS();
- \OC_User::setUserId('');
- Filesystem::tearDown();
- \OC_User::setUserId($this->user);
- \OC_Util::setupFS($this->user);
+ $this->loginAsUser($this->user);
// Create a dummy shared file
$view = new View('/'. $this->user . '/files');
diff --git a/apps/files_sharing/tests/testcase.php b/apps/files_sharing/tests/testcase.php
index b9e9f077201..7533b13f79d 100644
--- a/apps/files_sharing/tests/testcase.php
+++ b/apps/files_sharing/tests/testcase.php
@@ -153,6 +153,7 @@ abstract class TestCase extends \Test\TestCase {
\OC::$server->getUserSession()->setUser(null);
\OC\Files\Filesystem::tearDown();
\OC::$server->getUserSession()->login($user, $password);
+ \OC::$server->getUserFolder($user);
\OC_Util::setupFS($user);
}