diff options
author | Robin Appelman <robin@icewind.nl> | 2019-10-31 14:22:32 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2019-11-13 12:39:43 +0100 |
commit | 43fa746ad9eeb8c4596a33aa5b0d9a423dee4da4 (patch) | |
tree | 96a194ec04b2e4e85e191c163f756a20b25b8b25 /tests/lib/Files | |
parent | 2165f10aaf58d7662d6ffb9cb432b70672fc0738 (diff) | |
download | nextcloud-server-43fa746ad9eeb8c4596a33aa5b0d9a423dee4da4.tar.gz nextcloud-server-43fa746ad9eeb8c4596a33aa5b0d9a423dee4da4.zip |
dont create empty filecache extended rows
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests/lib/Files')
-rw-r--r-- | tests/lib/Files/Cache/CacheTest.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/lib/Files/Cache/CacheTest.php b/tests/lib/Files/Cache/CacheTest.php index 4ecccf2210d..f6794cfa2f0 100644 --- a/tests/lib/Files/Cache/CacheTest.php +++ b/tests/lib/Files/Cache/CacheTest.php @@ -718,7 +718,7 @@ class CacheTest extends \Test\TestCase { $data = ['size' => 100, 'mtime' => 50, 'mimetype' => 'text/plain', 'metadata_etag' => 'foo']; $this->cache->put("foo3", $data); $data = ['size' => 100, 'mtime' => 50, 'mimetype' => 'text/plain']; - $this->cache->put("foo4", $data); + $id4 = $this->cache->put("foo4", $data); $entry = $this->cache->get($id1); $this->assertEquals(20, $entry->getCreationTime()); @@ -766,6 +766,13 @@ class CacheTest extends \Test\TestCase { $this->assertEquals(20, $entries[0]->getCreationTime()); $this->assertEquals(25, $entries[0]->getUploadTime()); $this->assertEquals(null, $entries[0]->getMetadataEtag()); + + $this->cache->update($id4, ['upload_time' => 25]); + + $entry = $this->cache->get($id4); + $this->assertEquals(0, $entry->getCreationTime()); + $this->assertEquals(25, $entry->getUploadTime()); + $this->assertEquals(null, $entry->getMetadataEtag()); } protected function tearDown() { |