diff options
Diffstat (limited to 'tests/lib/files/filesystem.php')
-rw-r--r-- | tests/lib/files/filesystem.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/lib/files/filesystem.php b/tests/lib/files/filesystem.php index db1f22f894a..8245af0ace1 100644 --- a/tests/lib/files/filesystem.php +++ b/tests/lib/files/filesystem.php @@ -320,6 +320,28 @@ class Filesystem extends \Test\TestCase { } /** + * @expectedException \OC\User\NoUserException + */ + public function testNullUserThrows() { + \OC\Files\Filesystem::initMountPoints(null); + } + + public function testNullUserThrowsTwice() { + $thrown = 0; + try { + \OC\Files\Filesystem::initMountPoints(null); + } catch (NoUserException $e) { + $thrown++; + } + try { + \OC\Files\Filesystem::initMountPoints(null); + } catch (NoUserException $e) { + $thrown++; + } + $this->assertEquals(2, $thrown); + } + + /** * Tests that the home storage is used for the user's mount point */ public function testHomeMount() { |