aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-09-29 13:17:39 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2015-10-01 10:10:19 +0200
commite7232a848bd0c0846ea020f7b07f2cfe1298b1fb (patch)
treefafa258483b99fa6b7d0e62db2e40650b8cc3bc4 /tests
parent50874de1cae27907ec17f481dd5e1117cc3bdc78 (diff)
downloadnextcloud-server-e7232a848bd0c0846ea020f7b07f2cfe1298b1fb.tar.gz
nextcloud-server-e7232a848bd0c0846ea020f7b07f2cfe1298b1fb.zip
versions should always use the keys of the original file, no need to create new one
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/files/storage/wrapper/encryption.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/lib/files/storage/wrapper/encryption.php b/tests/lib/files/storage/wrapper/encryption.php
index 44e910b901f..095405462df 100644
--- a/tests/lib/files/storage/wrapper/encryption.php
+++ b/tests/lib/files/storage/wrapper/encryption.php
@@ -558,4 +558,27 @@ class Encryption extends \Test\Files\Storage\Storage {
$this->assertFalse(false);
}
+
+ /**
+ * @dataProvider dataTestIsVersion
+ * @param string $path
+ * @param bool $expected
+ */
+ public function testIsVersion($path, $expected) {
+ $this->assertSame($expected,
+ $this->invokePrivate($this->instance, 'isVersion', [$path])
+ );
+ }
+
+ public function dataTestIsVersion() {
+ return [
+ ['files_versions/foo', true],
+ ['/files_versions/foo', true],
+ ['//files_versions/foo', true],
+ ['files/versions/foo', false],
+ ['files/files_versions/foo', false],
+ ['files_versions_test/foo', false],
+ ];
+ }
+
}