Browse Source

Add new specific tests for SMB

pull/4527/head
Juan Pablo Villafáñez 9 years ago
committed by Joas Schilling
parent
commit
f2bd5f7496
No known key found for this signature in database GPG Key ID: E166FD8976B3BAC8
  1. 19
      apps/files_external/tests/Storage/SmbTest.php

19
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(''));
}
}
Loading…
Cancel
Save