summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-09-22 22:40:13 -0700
committerThomas Müller <thomas.mueller@tmit.eu>2013-09-22 22:40:13 -0700
commit03eedb58fc3529d27238959415b0f2904a0695e6 (patch)
tree42c33300a4619fd4b306dfedcc7c987386fec819 /tests
parent811f6804570af9a8d6a507d5aef4eb97cf36393e (diff)
parent3e7a86c6ecd332c268e690399a015ab618e87754 (diff)
downloadnextcloud-server-03eedb58fc3529d27238959415b0f2904a0695e6.tar.gz
nextcloud-server-03eedb58fc3529d27238959415b0f2904a0695e6.zip
Merge pull request #4327 from owncloud/scanfile-remove
remove deleted files while scanning
Diffstat (limited to 'tests')
-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);