aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/files/cache/scanner.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/lib/files/cache/scanner.php b/tests/lib/files/cache/scanner.php
index f6deb93a49e..4c90119814a 100644
--- a/tests/lib/files/cache/scanner.php
+++ b/tests/lib/files/cache/scanner.php
@@ -184,6 +184,16 @@ class Scanner extends \PHPUnit_Framework_TestCase {
$this->assertFalse($this->cache->inCache('folder/bar.txt'));
}
+ public function testScanRemovedFile(){
+ $this->fillTestFolders();
+
+ $this->scanner->scan('');
+ $this->assertTrue($this->cache->inCache('folder/bar.txt'));
+ $this->storage->unlink('folder/bar.txt');
+ $this->scanner->scanFile('folder/bar.txt');
+ $this->assertFalse($this->cache->inCache('folder/bar.txt'));
+ }
+
function setUp() {
$this->storage = new \OC\Files\Storage\Temporary(array());
$this->scanner = new \OC\Files\Cache\Scanner($this->storage);