diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-08-06 15:59:06 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-08-06 15:59:06 +0200 |
commit | 3e7a86c6ecd332c268e690399a015ab618e87754 (patch) | |
tree | 40487f94e73e07489fc2d05579eb1fa458e348c9 /tests/lib/files | |
parent | 057d7aa108f9b24c12b97f5f78008eb17a6d3bee (diff) | |
download | nextcloud-server-3e7a86c6ecd332c268e690399a015ab618e87754.tar.gz nextcloud-server-3e7a86c6ecd332c268e690399a015ab618e87754.zip |
remove deleted files while scanning
Diffstat (limited to 'tests/lib/files')
-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 263ceadccc7..bb90adce5c1 100644 --- a/tests/lib/files/cache/scanner.php +++ b/tests/lib/files/cache/scanner.php @@ -166,6 +166,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); |