diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-08-06 17:59:06 +0400 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-09-23 21:57:48 +0400 |
commit | 46cdb7b406b3a522f6a08e1f9a1de42d248143dc (patch) | |
tree | ce52cb46e331af20d02223b63ed75f4a58da4210 /tests | |
parent | 9c9597e582e0385ce2e7ba40386e8a4d28a9fa7d (diff) |
remove deleted files while scanning
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/files/cache/scanner.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/lib/files/cache/scanner.php b/tests/lib/files/cache/scanner.php index 3ab1f8408cc..916ac449f29 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); |