summaryrefslogtreecommitdiffstats
path: root/apps/files_external/tests
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-11-26 10:19:45 +0100
committerVincent Petry <pvince81@owncloud.com>2013-11-26 11:59:36 +0100
commit7c81ac3d28d8bafe8a220cfb10c0aec13bbf4077 (patch)
tree251b1e1eaae686a195123fd092d0e7ce670fa9b7 /apps/files_external/tests
parentdc67c7efa9ff20f8b4466e5b6490405439d4a90f (diff)
downloadnextcloud-server-7c81ac3d28d8bafe8a220cfb10c0aec13bbf4077.tar.gz
nextcloud-server-7c81ac3d28d8bafe8a220cfb10c0aec13bbf4077.zip
Fixed various Dropbox issues + unit tests
- fixed touch function to return true on success - fixed local metadata cache to remove deleted files/directories - fixed getMetaData() to ignore files reported as deleted by Dropbox - fixed "file not found" case to not log as exception - fixed "overwrite on rename" case - fixed unit tests to exclude unsupported cases - added unit test for touch return value - unit tests for Dropbox should all run correctly now
Diffstat (limited to 'apps/files_external/tests')
-rw-r--r--apps/files_external/tests/dropbox.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/files_external/tests/dropbox.php b/apps/files_external/tests/dropbox.php
index e4e598b06b0..4b052282019 100644
--- a/apps/files_external/tests/dropbox.php
+++ b/apps/files_external/tests/dropbox.php
@@ -21,6 +21,22 @@ class Dropbox extends Storage {
$this->instance = new \OC\Files\Storage\Dropbox($this->config['dropbox']);
}
+ public function directoryProvider() {
+ // doesn't support leading/trailing spaces
+ return array(array('folder'));
+ }
+
+ public function testDropboxTouchReturnValue() {
+ $this->assertFalse($this->instance->file_exists('foo'));
+
+ // true because succeeded
+ $this->assertTrue($this->instance->touch('foo'));
+ $this->assertTrue($this->instance->file_exists('foo'));
+
+ // false because not supported
+ $this->assertFalse($this->instance->touch('foo'));
+ }
+
public function tearDown() {
if ($this->instance) {
$this->instance->unlink('/');