diff options
author | Juan Pablo Villafáñez <jvillafanez@solidgear.es> | 2017-03-27 14:17:17 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-04-26 16:23:52 +0200 |
commit | f2bd5f749605d64cc82a337c0a31cbb87bee7693 (patch) | |
tree | 5015a059ef027bfa473bc5036e9de3de9cb0baed /apps/files_external/tests/Storage | |
parent | 71012b3432239eba6746fdcee0f3fc6fb6622e33 (diff) | |
download | nextcloud-server-f2bd5f749605d64cc82a337c0a31cbb87bee7693.tar.gz nextcloud-server-f2bd5f749605d64cc82a337c0a31cbb87bee7693.zip |
Add new specific tests for SMB
Diffstat (limited to 'apps/files_external/tests/Storage')
-rw-r--r-- | apps/files_external/tests/Storage/SmbTest.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/apps/files_external/tests/Storage/SmbTest.php b/apps/files_external/tests/Storage/SmbTest.php index 45c01a0c59e..037c4cd4d39 100644 --- a/apps/files_external/tests/Storage/SmbTest.php +++ b/apps/files_external/tests/Storage/SmbTest.php @@ -132,4 +132,23 @@ class SmbTest extends \Test\Files\Storage\Storage { $this->assertEquals(new Change(IChange::ADDED, 'newfile.txt'), $result); } + + public function testRenameRoot() { + // root can't be renamed + $this->assertFalse($this->instance->rename('', 'foo1')); + + $this->instance->mkdir('foo2'); + $this->assertFalse($this->instance->rename('foo2', '')); + $this->instance->rmdir('foo2'); + } + + public function testUnlinkRoot() { + // root can't be deleted + $this->assertFalse($this->instance->unlink('')); + } + + public function testRmdirRoot() { + // root can't be deleted + $this->assertFalse($this->instance->rmdir('')); + } } |