]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix filesystem and encryption tests
authorJörn Friedrich Dreyer <jfd@butonic.de>
Thu, 2 Apr 2015 09:28:10 +0000 (11:28 +0200)
committerJörn Friedrich Dreyer <jfd@butonic.de>
Fri, 10 Apr 2015 07:12:37 +0000 (09:12 +0200)
Conflicts:
apps/files_encryption/lib/util.php
apps/files_encryption/tests/hooks.php

tests/lib/files/filesystem.php

index 98e96e0cc78a16b622244862119025e4a017da05..a01b15eb2df7cf8842dbecbc46735d266094224a 100644 (file)
@@ -22,6 +22,8 @@
 
 namespace Test\Files;
 
+use OC\User\NoUserException;
+
 class Filesystem extends \Test\TestCase {
        /**
         * @var array tmpDirs
@@ -259,19 +261,14 @@ class Filesystem extends \Test\TestCase {
        }
 
        /**
-        * Tests that a local storage mount is used when passed user
-        * does not exist.
+        * Tests that an exception is thrown when passed user does not exist.
+        * @expectedException \OC\User\NoUserException
         */
        public function testLocalMountWhenUserDoesNotExist() {
                $datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data");
                $userId = $this->getUniqueID('user_');
 
                \OC\Files\Filesystem::initMountPoints($userId);
-
-               $homeMount = \OC\Files\Filesystem::getStorage('/' . $userId . '/');
-
-               $this->assertTrue($homeMount->instanceOfStorage('\OC\Files\Storage\Local'));
-               $this->assertEquals('local::' . $datadir . '/' . $userId . '/', $homeMount->getId());
        }
 
        /**