aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/files/cache
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/files/cache')
-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 3dacefa2b80..3ee7f099f38 100644
--- a/tests/lib/files/cache/scanner.php
+++ b/tests/lib/files/cache/scanner.php
@@ -144,6 +144,16 @@ class Scanner extends \PHPUnit_Framework_TestCase {
$this->assertEquals(-1, $newData['size']);
}
+ public function testRemovedFile() {
+ $this->fillTestFolders();
+
+ $this->scanner->scan('');
+ $this->assertTrue($this->cache->inCache('foo.txt'));
+ $this->storage->unlink('foo.txt');
+ $this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_SHALLOW);
+ $this->assertFalse($this->cache->inCache('foo.txt'));
+ }
+
function setUp() {
$this->storage = new \OC\Files\Storage\Temporary(array());
$this->scanner = new \OC\Files\Cache\Scanner($this->storage);